MSYS2-packages/python2/0070-dbm.patch
2014-06-04 11:03:57 +04:00

29 lines
1.2 KiB
Diff

diff -Naur a/setup.py b/setup.py
--- a/setup.py 2014-06-04 10:16:38.581000000 +0400
+++ b/setup.py 2014-06-04 10:16:48.081400000 +0400
@@ -1231,7 +1231,7 @@
dbm_order = ['gdbm']
# The standard Unix dbm module:
- if host_platform not in ['cygwin']:
+ if host_platform not in ['win32']:
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
@@ -1286,6 +1286,15 @@
],
libraries = gdbm_libs)
break
+ if find_file("ndbm.h", inc_dirs, []) is not None:
+ print("building dbm using gdbm")
+ dbmext = Extension(
+ 'dbm', ['dbmmodule.c'],
+ define_macros=[
+ ('HAVE_NDBM_H', None),
+ ],
+ libraries = gdbm_libs)
+ break
elif cand == "bdb":
if db_incs is not None:
print "building dbm using bdb"