diff options
author | Brett Cannon <bcannon@gmail.com> | 2005-04-15 20:32:39 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2005-04-15 20:32:39 (GMT) |
commit | 4454a1ff8453c12739c65da21e00927ea3bf9ad9 (patch) | |
tree | 05bfb33dbbb93be99dde73875dbe17fc00f355cb | |
parent | 1356f785c1fd8c2282f812b4ec6365359cb5b84f (diff) | |
download | cpython-4454a1ff8453c12739c65da21e00927ea3bf9ad9.zip cpython-4454a1ff8453c12739c65da21e00927ea3bf9ad9.tar.gz cpython-4454a1ff8453c12739c65da21e00927ea3bf9ad9.tar.bz2 |
Fix building of spwd; was incorrectly checking for the needed HAVE_* values to
properly build the module.
Also moved up the creation of config_h_vars (from
distutils.sysconfig.parse_config_h()) higher on up in detect_modules() so that
it can be used sooner).
-rw-r--r-- | setup.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -295,6 +295,9 @@ class PyBuildExt(build_ext): inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] + config_h = sysconfig.get_config_h_filename() + config_h_vars = sysconfig.parse_config_h(open(config_h)) + platform = self.get_platform() (srcdir,) = sysconfig.get_config_vars('srcdir') @@ -391,8 +394,8 @@ class PyBuildExt(build_ext): # grp(3) exts.append( Extension('grp', ['grpmodule.c']) ) # spwd, shadow passwords - if (sysconfig.get_config_var('HAVE_GETSPNAM') or - sysconfig.get_config_var('HAVE_GETSPENT')): + if (config_h_vars.get('HAVE_GETSPNAM', False) or + config_h_vars.get('HAVE_GETSPENT', False)): exts.append( Extension('spwd', ['spwdmodule.c']) ) # select(2); not on ancient System V exts.append( Extension('select', ['selectmodule.c']) ) @@ -785,8 +788,6 @@ class PyBuildExt(build_ext): ('BYTEORDER', xmlbo), ('XML_CONTEXT_BYTES','1024'), ] - config_h = sysconfig.get_config_h_filename() - config_h_vars = sysconfig.parse_config_h(open(config_h)) for feature_macro in ['HAVE_MEMMOVE', 'HAVE_BCOPY']: if config_h_vars.has_key(feature_macro): define_macros.append((feature_macro, '1')) |