$NetBSD: patch-aa,v 1.2 2003/08/18 20:57:13 recht Exp $ --- setup.py.orig 2003-07-10 14:48:39.000000000 +0200 +++ setup.py 2003-08-18 21:19:14.000000000 +0200 @@ -15,7 +15,7 @@ from distutils.command.install_lib import install_lib # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] +disabled_module_list = ["_curses", "_curses_panel", "_tkinter", "gdbm", "mpz", "pyexpat", "readline"] def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if @@ -240,9 +240,15 @@ return sys.platform def detect_modules(self): - # Ensure that /usr/local is always used - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + # Add the buildlink directories for pkgsrc + if os.environ.has_key('BUILDLINK_DIR'): + dir = os.environ['BUILDLINK_DIR'] + libdir = dir + '/lib' + incdir = dir + '/include' + if libdir not in self.compiler.library_dirs: + self.compiler.library_dirs.insert(0, libdir) + if incdir not in self.compiler.include_dirs: + self.compiler.include_dirs.insert(0, incdir) # fink installs lots of goodies in /sw/... - make sure we # check there @@ -396,13 +402,13 @@ # These represent audio samples or images as strings: # Disabled on 64-bit platforms - if sys.maxint != 9223372036854775807L: +# if sys.maxint != 9223372036854775807L: # Operations on audio samples - exts.append( Extension('audioop', ['audioop.c']) ) +# exts.append( Extension('audioop', ['audioop.c']) ) # Operations on images - exts.append( Extension('imageop', ['imageop.c']) ) +# exts.append( Extension('imageop', ['imageop.c']) ) # Read SGI RGB image files (but coded portably) - exts.append( Extension('rgbimg', ['rgbimgmodule.c']) ) +# exts.append( Extension('rgbimg', ['rgbimgmodule.c']) ) # readline if self.compiler.find_library_file(lib_dirs, 'readline'): @@ -436,9 +442,7 @@ depends = ['socketmodule.h']) ) # Detect SSL support for the socket module (via _ssl) ssl_incs = find_file('openssl/ssl.h', inc_dirs, - ['/usr/local/ssl/include', - '/usr/contrib/ssl/include/' - ] + [] ) if ssl_incs is not None: krb5_h = find_file('krb5.h', inc_dirs, @@ -446,9 +450,7 @@ if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, - ['/usr/local/ssl/lib', - '/usr/contrib/ssl/lib/' - ] ) + [] ) if (ssl_incs is not None and ssl_libs is not None): @@ -1128,7 +1130,7 @@ ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install - scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle'] + scripts = ['Tools/scripts/pydoc2.3'] ) # --install-platlib