Author djc
Recipients djc
Date 2012-02-16.09:37:14
SpamBayes Score 9.30422e-13
Marked as misclassified No
Message-id <>
distutils incorrectly handles CFLAGS as 1 argument instead of
space-separated list of arguments. distutils should respect environment
variables, which set compiler, linker etc.

--- Lib/distutils/
+++ Lib/distutils/
@@ -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

Patch was created by Arfrever Frehtes Taifersar Arahesis ( It was originally written for PyPy, but it seems like it should actually apply to the stdlib. This patch is for 2.7, I'm hoping it could be taken as a bug fix.
Date User Action Args
2012-02-16 09:37:15djcsetrecipients: + djc
2012-02-16 09:37:15djcsetmessageid: <>
2012-02-16 09:37:14djclinkissue14030 messages
2012-02-16 09:37:14djccreate