[Python-checkins] CVS: python/dist/src setup.py,1.13,1.14
A.M. Kuchling
akuchling@users.sourceforge.net
Tue, 23 Jan 2001 19:31:09 -0800
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv27066
Modified Files:
setup.py
Log Message:
Modified version of part of patch #102409 for Cygwin:
Get platform-specific modules right on Cygwin
Getting a string value for the platform has been factored out into
get_platform()
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** setup.py 2001/01/23 22:21:11 1.13
--- setup.py 2001/01/24 03:31:07 1.14
***************
*** 100,103 ****
--- 100,111 ----
build_ext.build_extensions(self)
+ def get_platform (self):
+ # Get value of sys.platform
+ platform = sys.platform
+ if platform[:6] =='cygwin':
+ platform = 'cygwin'
+
+ return platform
+
def detect_modules(self):
# Ensure that /usr/local is always used
***************
*** 114,120 ****
exts = []
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
! if sys.platform == 'Darwin1.2':
math_libs = []
--- 122,130 ----
exts = []
+ platform = self.get_platform()
+
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
! if platform == 'Darwin1.2':
math_libs = []
***************
*** 269,277 ****
# The standard Unix dbm module:
! if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
! exts.append( Extension('dbm', ['dbmmodule.c'],
! libraries = ['ndbm'] ) )
! else:
! exts.append( Extension('dbm', ['dbmmodule.c']) )
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
--- 279,288 ----
# The standard Unix dbm module:
! if platform not in ['cygwin']:
! if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
! exts.append( Extension('dbm', ['dbmmodule.c'],
! libraries = ['ndbm'] ) )
! else:
! exts.append( Extension('dbm', ['dbmmodule.c']) )
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
***************
*** 322,330 ****
# Unix-only modules
! if sys.platform not in ['mac', 'win32']:
# Steen Lumholt's termios module
exts.append( Extension('termios', ['termios.c']) )
# Jeremy Hylton's rlimit interface
! exts.append( Extension('resource', ['resource.c']) )
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
--- 333,342 ----
# Unix-only modules
! if platform not in ['mac', 'win32']:
# Steen Lumholt's termios module
exts.append( Extension('termios', ['termios.c']) )
# Jeremy Hylton's rlimit interface
! if platform not in ['cygwin']:
! exts.append( Extension('resource', ['resource.c']) )
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
***************
*** 334,338 ****
# Curses support, requring the System V version of curses, often
# provided by the ncurses library.
! if sys.platform == 'sunos4':
include_dirs += ['/usr/5include']
lib_dirs += ['/usr/5lib']
--- 346,350 ----
# Curses support, requring the System V version of curses, often
# provided by the ncurses library.
! if platform == 'sunos4':
include_dirs += ['/usr/5include']
lib_dirs += ['/usr/5lib']
***************
*** 364,368 ****
# Choose *one* of the options below for fpectl:
! if sys.platform == 'irix5':
# For SGI IRIX (tested on 5.3):
exts.append( Extension('fpectl', ['fpectlmodule.c'],
--- 376,380 ----
# Choose *one* of the options below for fpectl:
! if platform == 'irix5':
# For SGI IRIX (tested on 5.3):
exts.append( Extension('fpectl', ['fpectlmodule.c'],
***************
*** 421,430 ****
# Platform-specific libraries
! plat = sys.platform
! if plat == 'linux2':
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
! if plat == 'sunos5':
# SunOS specific modules
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
--- 433,441 ----
# Platform-specific libraries
! if platform == 'linux2':
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
! if platform == 'sunos5':
# SunOS specific modules
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
***************
*** 485,489 ****
# Check for various platform-specific directories
! if sys.platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
added_lib_dirs.append('/usr/openwin/lib')
--- 496,501 ----
# Check for various platform-specific directories
! platform = self.get_platform()
! if platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
added_lib_dirs.append('/usr/openwin/lib')
***************
*** 513,517 ****
libs.append('tcl'+version)
! if sys.platform in ['aix3', 'aix4']:
libs.append('ld')
--- 525,529 ----
libs.append('tcl'+version)
! if platform in ['aix3', 'aix4']:
libs.append('ld')