This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients christian.heimes, eric.araujo, palm.kevin, pitrou, slanger, tarek
Date 2010-11-16.03:08:31
SpamBayes Score 4.2002235e-11
Marked as misclassified No
Message-id <1289876912.75.0.961338114717.issue1326113@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-11-16 03:08:32eric.araujosetrecipients: + eric.araujo, slanger, pitrou, christian.heimes, tarek, palm.kevin
2010-11-16 03:08:32eric.araujosetmessageid: <1289876912.75.0.961338114717.issue1326113@psf.upfronthosting.co.za>
2010-11-16 03:08:31eric.araujolinkissue1326113 messages
2010-11-16 03:08:31eric.araujocreate