[Python-checkins] python/dist/src setup.py,1.98,1.99
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Mon, 08 Jul 2002 14:39:39 -0700
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv3934
Modified Files:
setup.py
Log Message:
The readme file said that OSX Carbon modules were only built for
-enable-framework builds, but setup.py built them anyway. Fixed.
Also normalized whitespace.
Bugfix candidate.
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** setup.py 27 Jun 2002 22:06:49 -0000 1.98
--- setup.py 8 Jul 2002 21:39:36 -0000 1.99
***************
*** 511,514 ****
--- 511,515 ----
raise found
except found:
+ dblibs = [dblib]
# A default source build puts Berkeley DB in something like
# /usr/local/Berkeley.3.3 and the lib dir under that isn't
***************
*** 525,529 ****
include_dirs=db_incs,
define_macros=[('HAVE_DB_185_H',1)],
! libraries=[dblib]))
else:
exts.append(Extension('bsddb', ['bsddbmodule.c'],
--- 526,530 ----
include_dirs=db_incs,
define_macros=[('HAVE_DB_185_H',1)],
! libraries=dblibs))
else:
exts.append(Extension('bsddb', ['bsddbmodule.c'],
***************
*** 531,535 ****
runtime_library_dirs=[dblib_dir],
include_dirs=db_incs,
! libraries=[dblib]))
else:
db_incs = None
--- 532,536 ----
runtime_library_dirs=[dblib_dir],
include_dirs=db_incs,
! libraries=dblibs))
else:
db_incs = None
***************
*** 538,555 ****
# The standard Unix dbm module:
! if platform not in ['cygwin', 'mac']:
! if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
exts.append( Extension('dbm', ['dbmmodule.c'],
libraries = ['ndbm'] ) )
! elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
exts.append( Extension('dbm', ['dbmmodule.c'],
libraries = ['gdbm'] ) )
elif db_incs is not None:
exts.append( Extension('dbm', ['dbmmodule.c'],
! library_dirs=dblib_dir,
include_dirs=db_incs,
libraries=dblibs))
- else:
- exts.append( Extension('dbm', ['dbmmodule.c']) )
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
--- 539,565 ----
# The standard Unix dbm module:
! if platform not in ['cygwin']:
! if (self.compiler.find_library_file(lib_dirs, 'ndbm')
! and find_file("ndbm.h", inc_dirs, []) is not None):
exts.append( Extension('dbm', ['dbmmodule.c'],
+ define_macros=[('HAVE_NDBM_H',None)],
libraries = ['ndbm'] ) )
! elif (platform in ['darwin']
! and find_file("ndbm.h", inc_dirs, []) is not None):
! # Darwin has ndbm in libc
exts.append( Extension('dbm', ['dbmmodule.c'],
+ define_macros=[('HAVE_NDBM_H',None)]) )
+ elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
+ and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
+ exts.append( Extension('dbm', ['dbmmodule.c'],
+ define_macros=[('HAVE_GDBM_NDBM_H',None)],
libraries = ['gdbm'] ) )
elif db_incs is not None:
exts.append( Extension('dbm', ['dbmmodule.c'],
! library_dirs=[dblib_dir],
include_dirs=db_incs,
+ define_macros=[('HAVE_BERKDB_H',None),
+ ('DB_DBM_HSEARCH',None)],
libraries=dblibs))
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
***************
*** 713,742 ****
if platform == 'darwin':
! # Mac OS X specific modules. These are ported over from MacPython
! # and still experimental. Some (such as gestalt or icglue) are
! # already generally useful, some (the GUI ones) really need to
! # be used from a framework.
#
# I would like to trigger on WITH_NEXT_FRAMEWORK but that isn't
# available here. This Makefile variable is also what the install
# procedure triggers on.
- frameworkdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR')
- exts.append( Extension('gestalt', ['gestaltmodule.c'],
- extra_link_args=['-framework', 'Carbon']) )
- exts.append( Extension('MacOS', ['macosmodule.c'],
- extra_link_args=['-framework', 'Carbon']) )
- exts.append( Extension('icglue', ['icgluemodule.c'],
- extra_link_args=['-framework', 'Carbon']) )
- exts.append( Extension('macfs',
- ['macfsmodule.c',
- '../Python/getapplbycreator.c'],
- extra_link_args=['-framework', 'Carbon']) )
exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'],
extra_link_args=['-framework', 'CoreFoundation']) )
! exts.append( Extension('_Res', ['res/_Resmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('_Snd', ['snd/_Sndmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! if frameworkdir:
exts.append( Extension('Nav', ['Nav.c'],
extra_link_args=['-framework', 'Carbon']) )
--- 723,754 ----
if platform == 'darwin':
! # Mac OS X specific modules. Modules linked against the Carbon
! # framework are only built for framework-enabled Pythons. As
! # of MacOSX 10.1 importing the Carbon framework from a non-windowing
! # application (MacOSX server, not logged in on the console) may
! # result in Python crashing.
#
# I would like to trigger on WITH_NEXT_FRAMEWORK but that isn't
# available here. This Makefile variable is also what the install
# procedure triggers on.
exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'],
extra_link_args=['-framework', 'CoreFoundation']) )
!
! framework = sysconfig.get_config_var('PYTHONFRAMEWORK')
! if framework:
! exts.append( Extension('gestalt', ['gestaltmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('MacOS', ['macosmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('icglue', ['icgluemodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('macfs',
! ['macfsmodule.c',
! '../Python/getapplbycreator.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('_Res', ['res/_Resmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
! exts.append( Extension('_Snd', ['snd/_Sndmodule.c'],
! extra_link_args=['-framework', 'Carbon']) )
exts.append( Extension('Nav', ['Nav.c'],
extra_link_args=['-framework', 'Carbon']) )
***************
*** 790,794 ****
['../'*n + 'waste/C_C++ Headers' for n in (0,1,2,3,4)])
waste_libs = find_library_file(self.compiler, "WASTE", [],
! ["../"*n + "waste/Static Libraries" for n in (0,1,2,3,4)])
if waste_incs != None and waste_libs != None:
(srcdir,) = sysconfig.get_config_vars('srcdir')
--- 802,806 ----
['../'*n + 'waste/C_C++ Headers' for n in (0,1,2,3,4)])
waste_libs = find_library_file(self.compiler, "WASTE", [],
! [ "../"*n + "waste/Static Libraries" for n in (0,1,2,3,4)])
if waste_incs != None and waste_libs != None:
(srcdir,) = sysconfig.get_config_vars('srcdir')