summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2005-02-16 00:07:19 (GMT)
committerBrett Cannon <bcannon@gmail.com>2005-02-16 00:07:19 (GMT)
commit46d9623875893be9e2bcbb804b82cfd7f8ed05df (patch)
treef9275223900f294277da486b2867d0bb7f53f832 /setup.py
parentf0db38dbf89c642bb43acb193c41e0329461be33 (diff)
downloadcpython-46d9623875893be9e2bcbb804b82cfd7f8ed05df.zip
cpython-46d9623875893be9e2bcbb804b82cfd7f8ed05df.tar.gz
cpython-46d9623875893be9e2bcbb804b82cfd7f8ed05df.tar.bz2
spwdmodule.c should only be built when either HAVE_GETSPNAM or HAVE_GETSPENT is
defined.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 360c476..9b41f4c 100644
--- a/setup.py
+++ b/setup.py
@@ -384,12 +384,14 @@ class PyBuildExt(build_ext):
# fcntl(2) and ioctl(2)
exts.append( Extension('fcntl', ['fcntlmodule.c']) )
if platform not in ['mac']:
- # pwd(3)
+ # pwd(3)
exts.append( Extension('pwd', ['pwdmodule.c']) )
# grp(3)
exts.append( Extension('grp', ['grpmodule.c']) )
# spwd, shadow passwords
- exts.append( Extension('spwd', ['spwdmodule.c']) )
+ if (sysconfig.get_config_var('HAVE_GETSPNAM') or
+ sysconfig.get_config_var('HAVE_GETSPENT')):
+ exts.append( Extension('spwd', ['spwdmodule.c']) )
# select(2); not on ancient System V
exts.append( Extension('select', ['selectmodule.c']) )