This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author djc
Recipients djc
Date 2012-02-16.09:37:14
SpamBayes Score 9.304224e-13
Marked as misclassified No
Message-id <1329385035.22.0.0715283153402.issue14030@psf.upfronthosting.co.za>
In-reply-to
Content
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/unixccompiler.py
+++ Lib/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

Patch was created by Arfrever Frehtes Taifersar Arahesis (arfrever.fta@gmail.com). 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.
History
Date User Action Args
2012-02-16 09:37:15djcsetrecipients: + djc
2012-02-16 09:37:15djcsetmessageid: <1329385035.22.0.0715283153402.issue14030@psf.upfronthosting.co.za>
2012-02-16 09:37:14djclinkissue14030 messages
2012-02-16 09:37:14djccreate