Éric Araujo <mer...@netwok.org> added the comment:

I agree this is a bug: it’s a broken feature, not a new one, even if it can be 
argued that fixing a long-standing behavior enables new usages, and is thus 
comparable to a new feature.

I found no mention of --libraries in the docs, so I looked at the file history, 
and it’s clear that the intent of the code does not match its behavior.  The 
fix is simple:

-        if isinstance(self.libraries, str):
-            self.libraries = [self.libraries]
+        self.ensure_string_list('libraries')

I guess Greg forgot to change that line of code when he invented the ensure_* 
methods.  No test is broken by this change.  Do we need a regression test for 
this?  It’s not strictly required IMO.

FTR, in distutils2, I want to make the types and formats clear for everything.  
For example, build_ext.swig_opts is defined as “a list” in the current docs, 
this time with an example that shows it’s space-separated 
(“--swig-opts="-modern -I../include"”).  The code does not use 
ensure_string_list, and hence does not support comma-separated.  IMO, any value 
described as list should accept space-separated and comma-separated.  This is 
probably out of scope for distutils, but something I definitely want to improve 
in distutils2.  Supporting multiple options (-lm -lfoo) is IMO feasible too.

----------
assignee: tarek -> eric.araujo
components: +Distutils2
stage:  -> unit test needed
type: feature request -> behavior
versions: +3rd party, Python 2.7, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1326113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to