Message190159
Sorry, I am unable to reproduce the problem with a vanilla Python 2.7.5 and a downloaded Cython 0.19.1 either installing directly with Cython's setup.py or using Pip 1.3.1. customize_compiler is used as part of every extension module build in Distutils; it is not something special. AFAICT, the compiler_so attribute of a CCompiler instance should always be a list. It is intended to be set up as such by the set_executables method of CCompiler (Lib/distutils/ccompiler.py) which calls set_executable for each item, including compiler_so.
Now there could be a problem in Python 2 if, for some reason, the value for 'compiler_so' has become a Unicode string: set_executable is looking only for an instance of type str. It looks like the original value for 'compiler_so' is constructed in customize_compiler (in lib/distutils/sysconfig.py) by first concatenating CC + ' ' + CFLAGS, where the CC and CFLAGS values are obtained from the Python build (using get_config_vars) and possibly overridden by environment variables of the same names. Then the value of the config var 'CCSHARED' is appended; it most likely is empty. So I would check to see the types of distutils.sysconfig.get_config_var("CC") and ("CFLAGS") and ("CCSHARED") as well as os.environ["CC"] and ["CFLAGS"]. If any of them return a type unicode string, I think that could explain the behavior you see. The use of Unicode strings for these kinds of values are likely to lead to trouble, one way or another, in Python 2 for sure. (Also, be aware that Cython extends Distutils with its own build_ext to allow building of Cython modules. I took a very quick look at it and did not see any obvious problems.) |
|
Date |
User |
Action |
Args |
2013-05-27 22:51:06 | ned.deily | set | recipients:
+ ned.deily, ronaldoussoren, samueljohn, hynek |
2013-05-27 22:51:06 | ned.deily | set | messageid: <1369695066.42.0.417070954103.issue18071@psf.upfronthosting.co.za> |
2013-05-27 22:51:06 | ned.deily | link | issue18071 messages |
2013-05-27 22:51:05 | ned.deily | create | |
|