Line
Link Here
|
0 |
-- setup.py |
0 |
++ setup.py |
Lines 790-805
Link Here
|
790 |
|
790 |
|
791 |
# The standard Unix dbm module: |
791 |
# The standard Unix dbm module: |
792 |
if platform not in ['cygwin']: |
792 |
if platform not in ['cygwin']: |
793 |
if find_file("ndbm.h", inc_dirs, []) is not None: |
793 |
# To prevent automagic dependencies check for relevant modules in |
794 |
# Some systems have -lndbm, others don't |
794 |
# disabled_module_list. |
795 |
if self.compiler.find_library_file(lib_dirs, 'ndbm'): |
795 |
if (self.compiler.find_library_file(lib_dirs, 'gdbm') |
796 |
ndbm_libs = ['ndbm'] |
796 |
and find_file("gdbm/ndbm.h", inc_dirs, []) is not None |
797 |
else: |
797 |
and 'gdbm' not in disabled_module_list): |
798 |
ndbm_libs = [] |
|
|
799 |
exts.append( Extension('_dbm', ['_dbmmodule.c'], |
800 |
define_macros=[('HAVE_NDBM_H',None)], |
801 |
libraries = ndbm_libs ) ) |
802 |
elif self.compiler.find_library_file(lib_dirs, 'gdbm'): |
803 |
gdbm_libs = ['gdbm'] |
798 |
gdbm_libs = ['gdbm'] |
804 |
if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): |
799 |
if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): |
805 |
gdbm_libs.append('gdbm_compat') |
800 |
gdbm_libs.append('gdbm_compat') |
Lines 813-818
Link Here
|
813 |
'_dbm', ['_dbmmodule.c'], |
808 |
'_dbm', ['_dbmmodule.c'], |
814 |
define_macros=[('HAVE_GDBM_DASH_NDBM_H',None)], |
809 |
define_macros=[('HAVE_GDBM_DASH_NDBM_H',None)], |
815 |
libraries = gdbm_libs ) ) |
810 |
libraries = gdbm_libs ) ) |
|
|
811 |
elif (self.compiler.find_library_file(lib_dirs, 'gdbm') |
812 |
and 'gdbm' not in disabled_module_list): |
813 |
# Some systems have -lndbm, others don't |
814 |
if self.compiler.find_library_file(lib_dirs, 'ndbm'): |
815 |
ndbm_libs = ['ndbm'] |
816 |
else: |
817 |
ndbm_libs = [] |
818 |
exts.append( Extension('_dbm', ['_dbmmodule.c'], |
819 |
define_macros=[('HAVE_NDBM_H',None)], |
820 |
libraries = ndbm_libs ) ) |
816 |
elif db_incs is not None: |
821 |
elif db_incs is not None: |
817 |
exts.append( Extension('_dbm', ['_dbmmodule.c'], |
822 |
exts.append( Extension('_dbm', ['_dbmmodule.c'], |
818 |
library_dirs=dblib_dir, |
823 |
library_dirs=dblib_dir, |
Lines 825-831
Link Here
|
825 |
missing.append('_dbm') |
830 |
missing.append('_dbm') |
826 |
|
831 |
|
827 |
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: |
832 |
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: |
828 |
if (self.compiler.find_library_file(lib_dirs, 'gdbm')): |
833 |
if (self.compiler.find_library_file(lib_dirs, 'gdbm') |
|
|
834 |
and 'gdbm' not in disabled_module_list): |
829 |
exts.append( Extension('_gdbm', ['_gdbmmodule.c'], |
835 |
exts.append( Extension('_gdbm', ['_gdbmmodule.c'], |
830 |
libraries = ['gdbm'] ) ) |
836 |
libraries = ['gdbm'] ) ) |
831 |
else: |
837 |
else: |