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