Lines 1-6
Link Here
|
1 |
--- setup3.py.orig |
1 |
--- setup3.py.orig 2016-02-08 21:18:47 UTC |
2 |
+++ setup3.py |
2 |
+++ setup3.py |
3 |
@@ -86,10 +86,7 @@ |
3 |
@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.ve |
4 |
category=DeprecationWarning) |
4 |
category=DeprecationWarning) |
5 |
|
5 |
|
6 |
|
6 |
|
Lines 8-18
Link Here
|
8 |
- from setuptools import setup, Extension |
8 |
- from setuptools import setup, Extension |
9 |
-except : |
9 |
-except : |
10 |
- from distutils.core import setup, Extension |
10 |
- from distutils.core import setup, Extension |
|
|
11 |
- |
11 |
+from distutils.core import setup, Extension |
12 |
+from distutils.core import setup, Extension |
12 |
|
|
|
13 |
from distutils.dep_util import newer |
13 |
from distutils.dep_util import newer |
14 |
import distutils.ccompiler |
14 |
import distutils.ccompiler |
15 |
@@ -295,8 +292,8 @@ |
15 |
|
|
|
16 |
@@ -288,8 +284,8 @@ if os.name == 'posix': |
16 |
incdir = os.path.join(BERKELEYDB_DIR, 'include') |
17 |
incdir = os.path.join(BERKELEYDB_DIR, 'include') |
17 |
if not libdir: |
18 |
if not libdir: |
18 |
libdir = os.path.join(BERKELEYDB_DIR, 'lib') |
19 |
libdir = os.path.join(BERKELEYDB_DIR, 'lib') |
Lines 23-34
Link Here
|
23 |
else: |
24 |
else: |
24 |
if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") |
25 |
if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") |
25 |
libname = [] |
26 |
libname = [] |
26 |
@@ -336,7 +333,7 @@ |
27 |
@@ -328,7 +324,7 @@ if os.name == 'posix': |
|
|
28 |
|
27 |
# read db.h to figure out what version of Berkeley DB this is |
29 |
# read db.h to figure out what version of Berkeley DB this is |
28 |
ver = None |
30 |
ver = None |
29 |
# This should move to "with" when we drop support for Python 2.4 and 2.5 |
31 |
- with open(os.path.join(incdir, 'db.h'), 'r') as f : |
30 |
- f = open(os.path.join(incdir, 'db.h'), 'r') |
32 |
+ with open('%%BDB_INCLUDE_DIR%%/db.h', 'r') as f : |
31 |
+ f = open('%%BDB_INCLUDE_DIR%%/db.h', 'r') |
33 |
db_h_lines = f.readlines() |
32 |
db_h_lines = f.readlines() |
|
|
33 |
f.close() |
34 |
db_ver_re = re.compile( |
34 |
db_ver_re = re.compile( |
|
|
35 |
r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*') |