]> git.pld-linux.org Git - packages/python.git/blob - python-no_ndbm.patch
- really use new libdir
[packages/python.git] / python-no_ndbm.patch
1 --- Python-2.3/setup.py Thu Jul 10 12:48:39 2003
2 +++ Python-2.3.new/setup.py     Thu Aug 28 15:02:31 2003
3 @@ -1007,31 +1007,8 @@
4              missing.append('bsddb185')
5  
6          # The standard Unix dbm module:
7 -        if platform not in ['cygwin']:
8 -            if find_file("ndbm.h", inc_dirs, []) is not None:
9 -                # Some systems have -lndbm, others don't
10 -                if self.compiler.find_library_file(lib_dirs, 'ndbm'):
11 -                    ndbm_libs = ['ndbm']
12 -                else:
13 -                    ndbm_libs = []
14 -                exts.append( Extension('dbm', ['dbmmodule.c'],
15 -                                       define_macros=[('HAVE_NDBM_H',None)],
16 -                                       libraries = ndbm_libs ) )
17 -            elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
18 -                  and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
19 -                exts.append( Extension('dbm', ['dbmmodule.c'],
20 -                                       define_macros=[('HAVE_GDBM_NDBM_H',None)],
21 -                                       libraries = ['gdbm'] ) )
22 -            elif db_incs is not None:
23 -                exts.append( Extension('dbm', ['dbmmodule.c'],
24 -                                       library_dirs=dblib_dir,
25 -                                       runtime_library_dirs=dblib_dir,
26 -                                       include_dirs=db_incs,
27 -                                       define_macros=[('HAVE_BERKDB_H',None),
28 -                                                      ('DB_DBM_HSEARCH',None)],
29 -                                       libraries=dblibs))
30 -            else:
31 -                missing.append('dbm')
32 +        exts.append( Extension('dbm', ['dbmmodule.c'],
33 +            libraries = ['gdbm', 'gdbm_compat'] ) )
34  
35          # Anthony Baxter's gdbm module.  GNU dbm(3) will require -lgdbm:
36          if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
37 --- Python-2.3/Modules/dbmmodule.c      Fri Nov 22 23:29:31 2002
38 +++ Python-2.3.new/Modules/dbmmodule.c  Thu Aug 28 14:51:48 2003
39 @@ -11,22 +11,12 @@
40  /* Some Linux systems install gdbm/ndbm.h, but not ndbm.h.  This supports
41   * whichever configure was able to locate.
42   */
43 -#if defined(HAVE_NDBM_H)
44  #include <ndbm.h>
45  #if defined(PYOS_OS2) && !defined(PYCC_GCC)
46  static char *which_dbm = "ndbm";
47  #else
48  static char *which_dbm = "GNU gdbm";  /* EMX port of GDBM */
49  #endif
50 -#elif defined(HAVE_GDBM_NDBM_H)
51 -#include <gdbm/ndbm.h>
52 -static char *which_dbm = "GNU gdbm";
53 -#elif defined(HAVE_BERKDB_H)
54 -#include <db.h>
55 -static char *which_dbm = "Berkeley DB";
56 -#else
57 -#error "No ndbm.h available!"
58 -#endif
59  
60  typedef struct {
61         PyObject_HEAD
This page took 0.034975 seconds and 3 git commands to generate.