[Python-Dev] setup.py is too aggressive

Moshe Zadka moshez@zadka.site.co.il
Sat, 24 Mar 2001 11:13:46 +0200


It seems to me setup.py tries to build libraries even when it's impossible
E.g., I had to add the patch attached so I will get no more ImportErrors
where the module shouts at me that it could not find a symbol.

*** Python-2.1b2/setup.py	Wed Mar 21 09:44:53 2001
--- Python-2.1b2-changed/setup.py	Sat Mar 24 10:49:20 2001
***************
*** 326,331 ****
--- 326,334 ----
              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, 'db1')):
+                 exts.append( Extension('dbm', ['dbmmodule.c'],
+                                        libraries = ['db1'] ) )
              else:
                  exts.append( Extension('dbm', ['dbmmodule.c']) )
  
***************
*** 348,353 ****
--- 351,358 ----
          dblib = []
          if self.compiler.find_library_file(lib_dirs, 'db'):
              dblib = ['db']
+         if self.compiler.find_library_file(lib_dirs, 'db1'):
+             dblib = ['db1']
          
          db185_incs = find_file('db_185.h', inc_dirs,
                                 ['/usr/include/db3', '/usr/include/db2'])

-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez@debian.org  |http://www.{python,debian,gnu}.org