[Python-checkins] python/dist/src setup.py,1.216,1.217
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Fri Apr 15 22:32:43 CEST 2005
Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28803
Modified Files:
setup.py
Log Message:
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).
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- setup.py 9 Mar 2005 22:21:08 -0000 1.216
+++ setup.py 15 Apr 2005 20:32:39 -0000 1.217
@@ -295,6 +295,9 @@
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 @@
# 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 @@
('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'))
More information about the Python-checkins
mailing list