diff options
author | Brett Cannon <bcannon@gmail.com> | 2004-12-18 20:48:09 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2004-12-18 20:48:09 (GMT) |
commit | 5399c6d3d4cf9496b46ce9f37975d6c8107a743d (patch) | |
tree | 82e093f438ce47e5ff48047c14af4260c89920a5 /setup.py | |
parent | 7e71fa5cfa250968eafdb77356621e3a9bbb0648 (diff) | |
download | cpython-5399c6d3d4cf9496b46ce9f37975d6c8107a743d.zip cpython-5399c6d3d4cf9496b46ce9f37975d6c8107a743d.tar.gz cpython-5399c6d3d4cf9496b46ce9f37975d6c8107a743d.tar.bz2 |
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.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -244,14 +244,14 @@ class PyBuildExt(build_ext): # 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") |