New issue 2455: pypy3.3: building tests: environment variables CC etc - not 
honored
https://bitbucket.org/pypy/pypy/issues/2455/pypy33-building-tests-environment

Danny Milosavljevic:

So I've finally successfully built pypy3.3 in Guix. Yay.

However, when I run the tests I get some failures. Turns out some of them are 
because ./ctypes_configure/cbuild.py and ./lib_pypy/_pypy_testcapi.py call 
[distutils.ccompiler.]new_compiler directly and nobody calls customize_compiler.

./ctypes_configure/cbuild.py:        compiler = new_compiler(force=1)
./lib_pypy/_pypy_testcapi.py:    from distutils.ccompiler import new_compiler
./lib_pypy/_pypy_testcapi.py:    compiler = new_compiler()

After each of these new_compiler calls one should call 
distutils.sysconfig.customize_compiler. Otherwise the environment variables are 
not picked up.

What's more, _pypy_testcapi has a comment that this builds an extension. So why 
doesn't it build the extension using distutils build_ext ? If it did, all would 
work normally without having to call funny distutils internals.

What's more, ctypes_configure/cbuild.py has a homegrown compiler_command 
function which seems to do the same as customize_compiler would do, just with a 
weird name for the environment variable (PYPY_CC) and with less 
customizability. The file also contains another CCompiler class (in addition to 
distutils.CCompiler). Weird... is that left over from when there was no 
distutils in pypy?


_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to