-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy path3.2.6-dbm.patch
More file actions
29 lines (28 loc) · 1.25 KB
/
3.2.6-dbm.patch
File metadata and controls
29 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git setup.py setup.py
index 3b78c70..0d911e8 100644
--- setup.py
+++ setup.py
@@ -1081,7 +1081,7 @@ class PyBuildExt(build_ext):
dbm_order = ['gdbm']
# The standard Unix dbm module:
- if platform not in ['cygwin']:
+ if 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
@@ -1136,6 +1136,15 @@ class PyBuildExt(build_ext):
],
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")