[pypy-issue] [issue1057] Be more careful about selecting the compiler in distutils

Dirkjan Ochtman tracker at bugs.pypy.org
Thu Feb 16 10:18:44 CET 2012


New submission from Dirkjan Ochtman <dirkjan at ochtman.nl>:

distutils of PyPy incorrectly handles CFLAGS as 1 argument instead of
space-separated list of arguments. distutils should respect environment
variables, which set compiler, linker etc.

--- lib-python/modified-2.7/distutils/unixccompiler.py
+++ lib-python/modified-2.7/distutils/unixccompiler.py
@@ -297,7 +297,7 @@
         # this time, there's no way to determine this information from
         # the configuration data stored in the Python installation, so
         # we use this hack.
-        compiler = os.path.basename(sysconfig.get_config_var("CC"))
+        compiler = os.path.basename(self.compiler[0])
         if sys.platform[:6] == "darwin":
             # MacOSX's linker doesn't understand the -R flag at all
             return "-L" + dir

----------
messages: 3950
nosy: djc, pypy-issue
priority: bug
status: unread
title: Be more careful about selecting the compiler in distutils

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1057>
________________________________________


More information about the pypy-issue mailing list