[Python-checkins] python/dist/src setup.py,1.208,1.209

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Sat Dec 18 21:48:14 CET 2004


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21493

Modified Files:
	setup.py 
Log Message:
Switch from getting LDFLAGS and CPPFLAGS from the environment to the Makefile.
This is to avoid a problem that inconsistently comes up where the environment
variable is unset while the Makefile clearly has the values set and are used
during ``make``.

Closes bug #1081045.


Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- setup.py	13 Dec 2004 12:01:24 -0000	1.208
+++ setup.py	18 Dec 2004 20:48:09 -0000	1.209
@@ -244,14 +244,14 @@
 
         # Add paths specified in the environment variables LDFLAGS and
         # CPPFLAGS.
-        # Since this file tends to be executed by ``make install`` its
-        # environment variables are those that the Makefile sets and not what
-        # the shell has.  The Makefile must keep the shell's values somewhere
-        # in order to be able to reach them at execution time.
+        # We must get the values from the Makefile and not the environment
+        # directly since an inconsistently reproducible issue comes up where
+        # the environment variable is not set even though the value were passed
+        # into configure and stored in the Makefile.
         for env_var, arg_name, dir_list in (
                 ('LDFLAGS', '-L', self.compiler.library_dirs),
                 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-            env_val = os.getenv(env_var)
+            env_val = sysconfig.get_config_var(env_var)
             if env_val:
                 parser = optparse.OptionParser()
                 parser.add_option(arg_name, dest="dirs", action="append")



More information about the Python-checkins mailing list