Message121260
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. |
|
Date |
User |
Action |
Args |
2010-11-16 03:08:32 | eric.araujo | set | recipients:
+ eric.araujo, slanger, pitrou, christian.heimes, tarek, palm.kevin |
2010-11-16 03:08:32 | eric.araujo | set | messageid: <1289876912.75.0.961338114717.issue1326113@psf.upfronthosting.co.za> |
2010-11-16 03:08:31 | eric.araujo | link | issue1326113 messages |
2010-11-16 03:08:31 | eric.araujo | create | |
|