Thu Jan 26 23:10:35 2017 UTC ()
Do not install bsddb185 module by default.
Bump PKGREVISION.

Based on patch from Jesus Cea on tech-pkg.

If you need this module, let me know and we can package it separately.


(wiz)
diff -r1.68 -r1.69 pkgsrc/lang/python27/Makefile
diff -r1.16 -r1.17 pkgsrc/lang/python27/PLIST.common
diff -r1.63 -r1.64 pkgsrc/lang/python27/distinfo
diff -r1.21 -r1.22 pkgsrc/lang/python27/patches/patch-am

cvs diff -r1.68 -r1.69 pkgsrc/lang/python27/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/python27/Makefile 2016/12/30 10:53:21 1.68
+++ pkgsrc/lang/python27/Makefile 2017/01/26 23:10:35 1.69
@@ -1,18 +1,19 @@ @@ -1,18 +1,19 @@
1# $NetBSD: Makefile,v 1.68 2016/12/30 10:53:21 adam Exp $ 1# $NetBSD: Makefile,v 1.69 2017/01/26 23:10:35 wiz Exp $
2 2
3.include "dist.mk" 3.include "dist.mk"
4 4
5PKGNAME= python27-${PY_DISTVERSION} 5PKGNAME= python27-${PY_DISTVERSION}
 6PKGREVISION= 1
6CATEGORIES= lang python 7CATEGORIES= lang python
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.python.org/ 10HOMEPAGE= http://www.python.org/
10COMMENT= Interpreted, interactive, object-oriented programming language 11COMMENT= Interpreted, interactive, object-oriented programming language
11LICENSE= python-software-foundation 12LICENSE= python-software-foundation
12 13
13DEPENDS= mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts 14DEPENDS= mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts
14 15
15CONFLICTS+= python-[0-9]* 16CONFLICTS+= python-[0-9]*
16 17
17GNU_CONFIGURE= yes 18GNU_CONFIGURE= yes
18CONFIGURE_ARGS+= --with-threads 19CONFIGURE_ARGS+= --with-threads
@@ -114,40 +115,29 @@ PLIST.no-nis= yes @@ -114,40 +115,29 @@ PLIST.no-nis= yes
114PLIST.nis= yes 115PLIST.nis= yes
115. endif 116. endif
116.else 117.else
117PLIST.dll= yes 118PLIST.dll= yes
118. if ${OPSYS} == "MirBSD" 119. if ${OPSYS} == "MirBSD"
119# neither nis nor no-nis 120# neither nis nor no-nis
120. elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat) 121. elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
121PLIST.nis= yes 122PLIST.nis= yes
122. else 123. else
123PLIST.no-nis= yes 124PLIST.no-nis= yes
124. endif 125. endif
125.endif 126.endif
126 127
127.include "../../mk/bdb.buildlink3.mk" 
128MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} 
129.if empty(BDB_LIBS) 
130BUILDLINK_TRANSFORM+= rm:-ldb 
131.endif 
132CFLAGS+= -DHAVE_DB_185_H 
133 
134# configure complains about buggy getaddrinfo() 128# configure complains about buggy getaddrinfo()
135CONFIGURE_ARGS.OSF1+= --disable-ipv6 129CONFIGURE_ARGS.OSF1+= --disable-ipv6
136 130
137.if defined(BUILDLINK_TRANSFORM) 
138MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q} 
139.endif 
140 
141PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} 131PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
142 132
143TEST_TARGET= test 133TEST_TARGET= test
144INSTALL_TARGET= altinstall 134INSTALL_TARGET= altinstall
145 135
146REPLACE_INTERPRETER+= py27 136REPLACE_INTERPRETER+= py27
147REPLACE.py27.old= .*python[^ ]* 137REPLACE.py27.old= .*python[^ ]*
148REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} 138REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
149REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py 139REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py
150REPLACE_FILES.py27+= Lib/*/*/*/*.py 140REPLACE_FILES.py27+= Lib/*/*/*/*.py
151 141
152SUBST_CLASSES+= libffi 142SUBST_CLASSES+= libffi
153SUBST_MESSAGE.libffi= Fixing libffi include path on Darwin. 143SUBST_MESSAGE.libffi= Fixing libffi include path on Darwin.

cvs diff -r1.16 -r1.17 pkgsrc/lang/python27/Attic/PLIST.common (expand / switch to unified diff)

--- pkgsrc/lang/python27/Attic/PLIST.common 2016/12/30 10:53:21 1.16
+++ pkgsrc/lang/python27/Attic/PLIST.common 2017/01/26 23:10:35 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST.common,v 1.16 2016/12/30 10:53:21 adam Exp $ 1@comment $NetBSD: PLIST.common,v 1.17 2017/01/26 23:10:35 wiz Exp $
2bin/2to3-${PY_VER_SUFFIX} 2bin/2to3-${PY_VER_SUFFIX}
3bin/pydoc${PY_VER_SUFFIX} 3bin/pydoc${PY_VER_SUFFIX}
4bin/python${PY_VER_SUFFIX} 4bin/python${PY_VER_SUFFIX}
5bin/python${PY_VER_SUFFIX}-config 5bin/python${PY_VER_SUFFIX}-config
6bin/smtpd${PY_VER_SUFFIX}.py 6bin/smtpd${PY_VER_SUFFIX}.py
7include/python${PY_VER_SUFFIX}/Python-ast.h 7include/python${PY_VER_SUFFIX}/Python-ast.h
8include/python${PY_VER_SUFFIX}/Python.h 8include/python${PY_VER_SUFFIX}/Python.h
9include/python${PY_VER_SUFFIX}/abstract.h 9include/python${PY_VER_SUFFIX}/abstract.h
10include/python${PY_VER_SUFFIX}/asdl.h 10include/python${PY_VER_SUFFIX}/asdl.h
11include/python${PY_VER_SUFFIX}/ast.h 11include/python${PY_VER_SUFFIX}/ast.h
12include/python${PY_VER_SUFFIX}/bitset.h 12include/python${PY_VER_SUFFIX}/bitset.h
13include/python${PY_VER_SUFFIX}/boolobject.h 13include/python${PY_VER_SUFFIX}/boolobject.h
14include/python${PY_VER_SUFFIX}/bufferobject.h 14include/python${PY_VER_SUFFIX}/bufferobject.h
@@ -1912,27 +1912,26 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/_ @@ -1912,27 +1912,26 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/_
1912lib/python${PY_VER_SUFFIX}/lib-dynload/_json.so 1912lib/python${PY_VER_SUFFIX}/lib-dynload/_json.so
1913lib/python${PY_VER_SUFFIX}/lib-dynload/_locale.so 1913lib/python${PY_VER_SUFFIX}/lib-dynload/_locale.so
1914lib/python${PY_VER_SUFFIX}/lib-dynload/_lsprof.so 1914lib/python${PY_VER_SUFFIX}/lib-dynload/_lsprof.so
1915lib/python${PY_VER_SUFFIX}/lib-dynload/_multibytecodec.so 1915lib/python${PY_VER_SUFFIX}/lib-dynload/_multibytecodec.so
1916lib/python${PY_VER_SUFFIX}/lib-dynload/_multiprocessing.so 1916lib/python${PY_VER_SUFFIX}/lib-dynload/_multiprocessing.so
1917lib/python${PY_VER_SUFFIX}/lib-dynload/_random.so 1917lib/python${PY_VER_SUFFIX}/lib-dynload/_random.so
1918lib/python${PY_VER_SUFFIX}/lib-dynload/_socket.so 1918lib/python${PY_VER_SUFFIX}/lib-dynload/_socket.so
1919lib/python${PY_VER_SUFFIX}/lib-dynload/_ssl.so 1919lib/python${PY_VER_SUFFIX}/lib-dynload/_ssl.so
1920lib/python${PY_VER_SUFFIX}/lib-dynload/_struct.so 1920lib/python${PY_VER_SUFFIX}/lib-dynload/_struct.so
1921lib/python${PY_VER_SUFFIX}/lib-dynload/_testcapi.so 1921lib/python${PY_VER_SUFFIX}/lib-dynload/_testcapi.so
1922lib/python${PY_VER_SUFFIX}/lib-dynload/array.so 1922lib/python${PY_VER_SUFFIX}/lib-dynload/array.so
1923lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so 1923lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so
1924lib/python${PY_VER_SUFFIX}/lib-dynload/binascii.so 1924lib/python${PY_VER_SUFFIX}/lib-dynload/binascii.so
1925lib/python${PY_VER_SUFFIX}/lib-dynload/bsddb185.so 
1926lib/python${PY_VER_SUFFIX}/lib-dynload/bz2.so 1925lib/python${PY_VER_SUFFIX}/lib-dynload/bz2.so
1927lib/python${PY_VER_SUFFIX}/lib-dynload/cPickle.so 1926lib/python${PY_VER_SUFFIX}/lib-dynload/cPickle.so
1928lib/python${PY_VER_SUFFIX}/lib-dynload/cStringIO.so 1927lib/python${PY_VER_SUFFIX}/lib-dynload/cStringIO.so
1929lib/python${PY_VER_SUFFIX}/lib-dynload/cmath.so 1928lib/python${PY_VER_SUFFIX}/lib-dynload/cmath.so
1930lib/python${PY_VER_SUFFIX}/lib-dynload/crypt.so 1929lib/python${PY_VER_SUFFIX}/lib-dynload/crypt.so
1931lib/python${PY_VER_SUFFIX}/lib-dynload/datetime.so 1930lib/python${PY_VER_SUFFIX}/lib-dynload/datetime.so
1932lib/python${PY_VER_SUFFIX}/lib-dynload/dbm.so 1931lib/python${PY_VER_SUFFIX}/lib-dynload/dbm.so
1933${PLIST.dl}lib/python${PY_VER_SUFFIX}/lib-dynload/dl.so 1932${PLIST.dl}lib/python${PY_VER_SUFFIX}/lib-dynload/dl.so
1934lib/python${PY_VER_SUFFIX}/lib-dynload/fcntl.so 1933lib/python${PY_VER_SUFFIX}/lib-dynload/fcntl.so
1935lib/python${PY_VER_SUFFIX}/lib-dynload/future_builtins.so 1934lib/python${PY_VER_SUFFIX}/lib-dynload/future_builtins.so
1936lib/python${PY_VER_SUFFIX}/lib-dynload/grp.so 1935lib/python${PY_VER_SUFFIX}/lib-dynload/grp.so
1937${PLIST.extra-so}lib/python${PY_VER_SUFFIX}/lib-dynload/imageop.so 1936${PLIST.extra-so}lib/python${PY_VER_SUFFIX}/lib-dynload/imageop.so
1938lib/python${PY_VER_SUFFIX}/lib-dynload/itertools.so 1937lib/python${PY_VER_SUFFIX}/lib-dynload/itertools.so

cvs diff -r1.63 -r1.64 pkgsrc/lang/python27/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/python27/distinfo 2017/01/08 19:49:15 1.63
+++ pkgsrc/lang/python27/distinfo 2017/01/26 23:10:35 1.64
@@ -1,32 +1,32 @@ @@ -1,32 +1,32 @@
1$NetBSD: distinfo,v 1.63 2017/01/08 19:49:15 wiz Exp $ 1$NetBSD: distinfo,v 1.64 2017/01/26 23:10:35 wiz Exp $
2 2
3SHA1 (Python-2.7.13.tar.xz) = 18a8f30a0356c751b8d0ea6f76e764cab13ee046 3SHA1 (Python-2.7.13.tar.xz) = 18a8f30a0356c751b8d0ea6f76e764cab13ee046
4RMD160 (Python-2.7.13.tar.xz) = be09518cdc335314de1c5ebe181690082ce780d7 4RMD160 (Python-2.7.13.tar.xz) = be09518cdc335314de1c5ebe181690082ce780d7
5SHA512 (Python-2.7.13.tar.xz) = f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b 5SHA512 (Python-2.7.13.tar.xz) = f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b
6Size (Python-2.7.13.tar.xz) = 12495628 bytes 6Size (Python-2.7.13.tar.xz) = 12495628 bytes
7SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54 7SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54
8SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320 8SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320
9SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb 9SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb
10SHA1 (patch-Lib_multiprocessing_process.py) = 15699bd8ec822bf54a0631102e00e0a34f882803 10SHA1 (patch-Lib_multiprocessing_process.py) = 15699bd8ec822bf54a0631102e00e0a34f882803
11SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e 11SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e
12SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c 12SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c
13SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1 13SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1
14SHA1 (patch-Modules_getpath.c) = 9bb2c040895ad6bbe4d0b5807803723b5437d47b 14SHA1 (patch-Modules_getpath.c) = 9bb2c040895ad6bbe4d0b5807803723b5437d47b
15SHA1 (patch-Modules_posixmodule.c) = 5105d380cd49bf49b8adbd9aa5ffb245195728ed 15SHA1 (patch-Modules_posixmodule.c) = 5105d380cd49bf49b8adbd9aa5ffb245195728ed
16SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4 16SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4
17SHA1 (patch-aa) = d9626c1648d7ff2a7da7352665bcb05f4ab0412a 17SHA1 (patch-aa) = d9626c1648d7ff2a7da7352665bcb05f4ab0412a
18SHA1 (patch-ab) = ea4feba4e93dbcff07050c82a00d591bb650e934 18SHA1 (patch-ab) = ea4feba4e93dbcff07050c82a00d591bb650e934
19SHA1 (patch-ad) = 96ae702995d434e2d7ec0ac62e37427a90b61d13 19SHA1 (patch-ad) = 96ae702995d434e2d7ec0ac62e37427a90b61d13
20SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6 20SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6
21SHA1 (patch-ah) = dbb36db1182748fae26320dbe0bc5f9006886b1c 21SHA1 (patch-ah) = dbb36db1182748fae26320dbe0bc5f9006886b1c
22SHA1 (patch-al) = 541936b79f281db06761f4fa6a65a04e852b02b4 22SHA1 (patch-al) = 541936b79f281db06761f4fa6a65a04e852b02b4
23SHA1 (patch-am) = cf82bd1996aea8a8536bd37a74563bb85817c968 23SHA1 (patch-am) = 25c29f3799cb02db962d5c42d71ec59b4748466f
24SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196 24SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196
25SHA1 (patch-ao) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa 25SHA1 (patch-ao) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
26SHA1 (patch-au) = 0ecdb937cbd58e3dbfa6fb94d1af5838619c77fd 26SHA1 (patch-au) = 0ecdb937cbd58e3dbfa6fb94d1af5838619c77fd
27SHA1 (patch-av) = e6aef090b444b455fe351308d251e670329b7dc3 27SHA1 (patch-av) = e6aef090b444b455fe351308d251e670329b7dc3
28SHA1 (patch-aw) = d07129531ec1427669092c504c12247206408c2d 28SHA1 (patch-aw) = d07129531ec1427669092c504c12247206408c2d
29SHA1 (patch-ax) = 8a7a0e5cbfec279a05945dffafea1b1131a76f0e 29SHA1 (patch-ax) = 8a7a0e5cbfec279a05945dffafea1b1131a76f0e
30SHA1 (patch-az) = 01e113b0bd251978b555caaaa60b79c372edebce 30SHA1 (patch-az) = 01e113b0bd251978b555caaaa60b79c372edebce
31SHA1 (patch-pyconfig.h.in) = a0143ecdc2a3fb10220d0e3ee94fb9779a45e9e1 31SHA1 (patch-pyconfig.h.in) = a0143ecdc2a3fb10220d0e3ee94fb9779a45e9e1
32SHA1 (patch-xa) = 517cfefc2f2e13631d22bad28c327513cdf17c10 32SHA1 (patch-xa) = 517cfefc2f2e13631d22bad28c327513cdf17c10

cvs diff -r1.21 -r1.22 pkgsrc/lang/python27/patches/Attic/patch-am (expand / switch to unified diff)

--- pkgsrc/lang/python27/patches/Attic/patch-am 2016/07/26 16:44:28 1.21
+++ pkgsrc/lang/python27/patches/Attic/patch-am 2017/01/26 23:10:35 1.22
@@ -1,114 +1,113 @@ @@ -1,114 +1,113 @@
1$NetBSD: patch-am,v 1.21 2016/07/26 16:44:28 kamil Exp $ 1$NetBSD: patch-am,v 1.22 2017/01/26 23:10:35 wiz Exp $
2 2
3Disabled modules for normal build: 3Disabled modules for normal build:
4bsddb 4bsddb
 5bsddb185
5curses 6curses
6curses_panel 7curses_panel
7elementtree 8elementtree
8sqlite3 9sqlite3
9tkinter 10tkinter
10gdbm 11gdbm
11pyexpat 12pyexpat
12readline 13readline
13{linux,oss,sun}audiodev 14{linux,oss,sun}audiodev
14spwd 15spwd
15Those have separate packages where needed. 16Those have separate packages where needed.
16 17
17Only check the BUILDLINK_DIR for libraries etc, do not pick up random 18Only check the BUILDLINK_DIR for libraries etc, do not pick up random
18headers and libraries from the system. 19headers and libraries from the system.
19 20
20Build the _ssl module with pkgsrc choiced OpenSSL. 21Build the _ssl module with pkgsrc choiced OpenSSL.
21 22
22Build the 1.85 compat module all the time against the BDB version of choice. 
23 
24cygwin 2.7.3-no-libm.patch 23cygwin 2.7.3-no-libm.patch
25 24
26--- setup.py.orig 2016-06-25 21:49:32.000000000 +0000 25--- setup.py.orig 2016-06-25 21:49:32.000000000 +0000
27+++ setup.py 26+++ setup.py
28@@ -33,7 +33,7 @@ host_platform = get_platform() 27@@ -33,7 +33,7 @@
29 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) 28 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
30  29
31 # This global variable is used to hold the list of modules to be disabled. 30 # This global variable is used to hold the list of modules to be disabled.
32-disabled_module_list = [] 31-disabled_module_list = []
33+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"] 32+disabled_module_list = ["_bsddb", "bsddb185", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"]
34  33
35 def add_dir_to_list(dirlist, dir): 34 def add_dir_to_list(dirlist, dir):
36 """Add the directory 'dir' to the list 'dirlist' (at the front) if 35 """Add the directory 'dir' to the list 'dirlist' (at the front) if
37@@ -454,10 +454,15 @@ class PyBuildExt(build_ext): 36@@ -454,10 +454,15 @@
38 os.unlink(tmpfile) 37 os.unlink(tmpfile)
39  38
40 def detect_modules(self): 39 def detect_modules(self):
41- # Ensure that /usr/local is always used 40- # Ensure that /usr/local is always used
42- if not cross_compiling: 41- if not cross_compiling:
43- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 42- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
44- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 43- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
45+ # Add the buildlink directories for pkgsrc 44+ # Add the buildlink directories for pkgsrc
46+ if os.environ.has_key('BUILDLINK_DIR'): 45+ if os.environ.has_key('BUILDLINK_DIR'):
47+ dir = os.environ['BUILDLINK_DIR'] 46+ dir = os.environ['BUILDLINK_DIR']
48+ libdir = dir + '/lib' 47+ libdir = dir + '/lib'
49+ incdir = dir + '/include' 48+ incdir = dir + '/include'
50+ if libdir not in self.compiler.library_dirs: 49+ if libdir not in self.compiler.library_dirs:
51+ self.compiler.library_dirs.insert(0, libdir) 50+ self.compiler.library_dirs.insert(0, libdir)
52+ if incdir not in self.compiler.include_dirs: 51+ if incdir not in self.compiler.include_dirs:
53+ self.compiler.include_dirs.insert(0, incdir) 52+ self.compiler.include_dirs.insert(0, incdir)
54 if cross_compiling: 53 if cross_compiling:
55 self.add_gcc_paths() 54 self.add_gcc_paths()
56 self.add_multiarch_paths() 55 self.add_multiarch_paths()
57@@ -569,7 +574,7 @@ class PyBuildExt(build_ext): 56@@ -569,7 +574,7 @@
58  57
59 # Check for MacOS X, which doesn't need libm.a at all 58 # Check for MacOS X, which doesn't need libm.a at all
60 math_libs = ['m'] 59 math_libs = ['m']
61- if host_platform in ['darwin', 'beos']: 60- if host_platform in ['darwin', 'beos']:
62+ if host_platform in ['darwin', 'beos', 'cygwin']: 61+ if host_platform in ['darwin', 'beos', 'cygwin']:
63 math_libs = [] 62 math_libs = []
64  63
65 # XXX Omitted modules: gl, pure, dl, SGI-specific modules 64 # XXX Omitted modules: gl, pure, dl, SGI-specific modules
66@@ -809,11 +814,10 @@ class PyBuildExt(build_ext): 65@@ -809,11 +814,10 @@
67 libraries=math_libs) ) 66 libraries=math_libs) )
68 # Detect SSL support for the socket module (via _ssl) 67 # Detect SSL support for the socket module (via _ssl)
69 search_for_ssl_incs_in = [ 68 search_for_ssl_incs_in = [
70- '/usr/local/ssl/include', 69- '/usr/local/ssl/include',
71- '/usr/contrib/ssl/include/' 70- '/usr/contrib/ssl/include/'
72+ '@SSLBASE@/include' 71+ '@SSLBASE@/include'
73 ] 72 ]
74- ssl_incs = find_file('openssl/ssl.h', inc_dirs, 73- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
75- search_for_ssl_incs_in 74- search_for_ssl_incs_in
76+ ssl_incs = find_file('openssl/ssl.h', [], 75+ ssl_incs = find_file('openssl/ssl.h', [],
77+ search_for_ssl_incs_in + inc_dirs 76+ search_for_ssl_incs_in + inc_dirs
78 ) 77 )
79 if ssl_incs is not None: 78 if ssl_incs is not None:
80 krb5_h = find_file('krb5.h', inc_dirs, 79 krb5_h = find_file('krb5.h', inc_dirs,
81@@ -821,9 +825,7 @@ class PyBuildExt(build_ext): 80@@ -821,9 +825,7 @@
82 if krb5_h: 81 if krb5_h:
83 ssl_incs += krb5_h 82 ssl_incs += krb5_h
84 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 83 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
85- ['/usr/local/ssl/lib', 84- ['/usr/local/ssl/lib',
86- '/usr/contrib/ssl/lib/' 85- '/usr/contrib/ssl/lib/'
87- ] ) 86- ] )
88+ [] ) 87+ [] )
89  88
90 if (ssl_incs is not None and 89 if (ssl_incs is not None and
91 ssl_libs is not None): 90 ssl_libs is not None):
92@@ -842,7 +844,7 @@ class PyBuildExt(build_ext): 91@@ -842,7 +844,7 @@
93  92
94 # look for the openssl version header on the compiler search path. 93 # look for the openssl version header on the compiler search path.
95 opensslv_h = find_file('openssl/opensslv.h', [], 94 opensslv_h = find_file('openssl/opensslv.h', [],
96- inc_dirs + search_for_ssl_incs_in) 95- inc_dirs + search_for_ssl_incs_in)
97+ search_for_ssl_incs_in + inc_dirs) 96+ search_for_ssl_incs_in + inc_dirs)
98 if opensslv_h: 97 if opensslv_h:
99 name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') 98 name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
100 if host_platform == 'darwin' and is_macosx_sdk_path(name): 99 if host_platform == 'darwin' and is_macosx_sdk_path(name):
101@@ -942,175 +944,6 @@ class PyBuildExt(build_ext): 100@@ -942,175 +944,6 @@
102 else: 101 else:
103 raise ValueError("unknown major BerkeleyDB version", major) 102 raise ValueError("unknown major BerkeleyDB version", major)
104  103
105- # construct a list of paths to look for the header file in on 104- # construct a list of paths to look for the header file in on
106- # top of the normal inc_dirs. 105- # top of the normal inc_dirs.
107- db_inc_paths = [ 106- db_inc_paths = [
108- '/usr/include/db4', 107- '/usr/include/db4',
109- '/usr/local/include/db4', 108- '/usr/local/include/db4',
110- '/opt/sfw/include/db4', 109- '/opt/sfw/include/db4',
111- '/usr/include/db3', 110- '/usr/include/db3',
112- '/usr/local/include/db3', 111- '/usr/local/include/db3',
113- '/opt/sfw/include/db3', 112- '/opt/sfw/include/db3',
114- # Fink defaults (http://fink.sourceforge.net/) 113- # Fink defaults (http://fink.sourceforge.net/)
@@ -264,61 +263,67 @@ cygwin 2.7.3-no-libm.patch @@ -264,61 +263,67 @@ cygwin 2.7.3-no-libm.patch
264- runtime_library_dirs=dblib_dir, 263- runtime_library_dirs=dblib_dir,
265- include_dirs=db_incs, 264- include_dirs=db_incs,
266- libraries=dblibs)) 265- libraries=dblibs))
267- else: 266- else:
268- if db_setup_debug: print "db: no appropriate library found" 267- if db_setup_debug: print "db: no appropriate library found"
269- db_incs = None 268- db_incs = None
270- dblibs = [] 269- dblibs = []
271- dblib_dir = None 270- dblib_dir = None
272- missing.append('_bsddb') 271- missing.append('_bsddb')
273- 272-
274 # The sqlite interface 273 # The sqlite interface
275 sqlite_setup_debug = False # verbose debug prints from this script? 274 sqlite_setup_debug = False # verbose debug prints from this script?
276  275
277@@ -1227,35 +1060,39 @@ class PyBuildExt(build_ext): 276@@ -1216,46 +1049,32 @@
278 # we do not build this one. Otherwise this build will pick up 277 else:
279 # the more recent berkeleydb's db.h file first in the include path 278 missing.append('_sqlite3')
280 # when attempting to compile and it will fail. 279
 280- # Look for Berkeley db 1.85. Note that it is built as a different
 281- # module name so it can be included even when later versions are
 282- # available. A very restrictive search is performed to avoid
 283- # accidentally building this module with a later version of the
 284- # underlying db library. May BSD-ish Unixes incorporate db 1.85
 285- # symbols into libc and place the include file in /usr/include.
 286- #
 287- # If the better bsddb library can be built (db_incs is defined)
 288- # we do not build this one. Otherwise this build will pick up
 289- # the more recent berkeleydb's db.h file first in the include path
 290- # when attempting to compile and it will fail.
281- f = "/usr/include/db.h" 291- f = "/usr/include/db.h"
282- 292-
283- if host_platform == 'darwin': 293- if host_platform == 'darwin':
284- if is_macosx_sdk_path(f): 294- if is_macosx_sdk_path(f):
285- sysroot = macosx_sdk_root() 295- sysroot = macosx_sdk_root()
286- f = os.path.join(sysroot, f[1:]) 296- f = os.path.join(sysroot, f[1:])
287- 297-
288- if os.path.exists(f) and not db_incs: 298- if os.path.exists(f) and not db_incs:
289- data = open(f).read() 299- data = open(f).read()
290- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 300- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
291- if m is not None: 301- if m is not None:
292- # bingo - old version used hash file format version 2 302- # bingo - old version used hash file format version 2
293- ### XXX this should be fixed to not be platform-dependent 303- ### XXX this should be fixed to not be platform-dependent
294- ### but I don't have direct access to an osf1 platform and 304- ### but I don't have direct access to an osf1 platform and
295- ### seemed to be muffing the search somehow 305- ### seemed to be muffing the search somehow
296- libraries = host_platform == "osf1" and ['db'] or None 306- libraries = host_platform == "osf1" and ['db'] or None
297- if libraries is not None: 307- if libraries is not None:
298- exts.append(Extension('bsddb185', ['bsddbmodule.c'], 308- exts.append(Extension('bsddb185', ['bsddbmodule.c'],
299- libraries=libraries)) 309- libraries=libraries))
300- else: 310- else:
301- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 311- exts.append(Extension('bsddb185', ['bsddbmodule.c']))
302- else: 312- else:
303- missing.append('bsddb185') 313- missing.append('bsddb185')
304+ libraries = os.getenv("PY_BDB_TYPE", "") 314- else:
305+ if libraries: 
306+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], 
307+ libraries=['db'])) 
308 else: 
309- missing.append('bsddb185') 315- missing.append('bsddb185')
310+ exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 316-
311  
312 dbm_order = ['gdbm'] 317 dbm_order = ['gdbm']
313 # The standard Unix dbm module: 318 # The standard Unix dbm module:
314 if host_platform not in ['cygwin']: 319 if host_platform not in ['cygwin']:
315+ ## Top half based on find_file 320+ ## Top half based on find_file
316+ def find_ndbm_h(dirs): 321+ def find_ndbm_h(dirs):
317+ ret = None 322+ ret = None
318+ if sys.platform == 'darwin': 323+ if sys.platform == 'darwin':
319+ sysroot = macosx_sdk_root() 324+ sysroot = macosx_sdk_root()
320+ for dir in dirs: 325+ for dir in dirs:
321+ f = os.path.join(dir, 'ndbm.h') 326+ f = os.path.join(dir, 'ndbm.h')
322+ if sys.platform == 'darwin' and is_macosx_sdk_path(dir): 327+ if sys.platform == 'darwin' and is_macosx_sdk_path(dir):
323+ f = os.path.join(sysroot, dir[1:], 'ndbm.h') 328+ f = os.path.join(sysroot, dir[1:], 'ndbm.h')
324+ if not os.path.exists(f): continue 329+ if not os.path.exists(f): continue
@@ -328,62 +333,62 @@ cygwin 2.7.3-no-libm.patch @@ -328,62 +333,62 @@ cygwin 2.7.3-no-libm.patch
328+ while 1: 333+ while 1:
329+ line = input.readline() 334+ line = input.readline()
330+ if not line: break 335+ if not line: break
331+ if re.search('This file is part of GDBM', line): 336+ if re.search('This file is part of GDBM', line):
332+ ret = None 337+ ret = None
333+ break 338+ break
334+ input.close() 339+ input.close()
335+ break 340+ break
336+ return ret 341+ return ret
337+ 342+
338 config_args = [arg.strip("'") 343 config_args = [arg.strip("'")
339 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] 344 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
340 dbm_args = [arg for arg in config_args 345 dbm_args = [arg for arg in config_args
341@@ -1267,7 +1104,7 @@ class PyBuildExt(build_ext): 346@@ -1267,7 +1086,7 @@
342 dbmext = None 347 dbmext = None
343 for cand in dbm_order: 348 for cand in dbm_order:
344 if cand == "ndbm": 349 if cand == "ndbm":
345- if find_file("ndbm.h", inc_dirs, []) is not None: 350- if find_file("ndbm.h", inc_dirs, []) is not None:
346+ if find_ndbm_h(inc_dirs) is not None: 351+ if find_ndbm_h(inc_dirs) is not None:
347 # Some systems have -lndbm, others have -lgdbm_compat, 352 # Some systems have -lndbm, others have -lgdbm_compat,
348 # others don't have either 353 # others don't have either
349 if self.compiler.find_library_file(lib_dirs, 354 if self.compiler.find_library_file(lib_dirs,
350@@ -1311,18 +1148,14 @@ class PyBuildExt(build_ext): 355@@ -1311,18 +1130,14 @@
351 libraries = gdbm_libs) 356 libraries = gdbm_libs)
352 break 357 break
353 elif cand == "bdb": 358 elif cand == "bdb":
354- if db_incs is not None: 359- if db_incs is not None:
355- print "building dbm using bdb" 360- print "building dbm using bdb"
356- dbmext = Extension('dbm', ['dbmmodule.c'], 361- dbmext = Extension('dbm', ['dbmmodule.c'],
357- library_dirs=dblib_dir, 362- library_dirs=dblib_dir,
358- runtime_library_dirs=dblib_dir, 363- runtime_library_dirs=dblib_dir,
359- include_dirs=db_incs, 364- include_dirs=db_incs,
360- define_macros=[ 365- define_macros=[
361- ('HAVE_BERKDB_H', None), 366- ('HAVE_BERKDB_H', None),
362- ('DB_DBM_HSEARCH', None), 367- ('DB_DBM_HSEARCH', None),
363- ], 368- ],
364- libraries=dblibs) 369- libraries=dblibs)
365- break 370- break
366+ print "building dbm using bdb" 371+ print "building dbm using bdb"
367+ dbmext = Extension('dbm', ['dbmmodule.c'], 372+ dbmext = Extension('dbm', ['dbmmodule.c'],
368+ define_macros=[ 373+ define_macros=[
369+ ('HAVE_BERKDB_H', None), 374+ ('HAVE_BERKDB_H', None),
370+ ('DB_DBM_HSEARCH', None), 375+ ('DB_DBM_HSEARCH', None),
371+ ], 376+ ],
372+ libraries=["db"]) 377+ libraries=["db"])
373+ break 378+ break
374 if dbmext is not None: 379 if dbmext is not None:
375 exts.append(dbmext) 380 exts.append(dbmext)
376 else: 381 else:
377@@ -2250,9 +2083,9 @@ def main(): 382@@ -2250,9 +2065,9 @@
378 ext_modules=[Extension('_struct', ['_struct.c'])], 383 ext_modules=[Extension('_struct', ['_struct.c'])],
379  384
380 # Scripts to install 385 # Scripts to install
381- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 386- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
382- 'Tools/scripts/2to3', 387- 'Tools/scripts/2to3',
383- 'Lib/smtpd.py'] 388- 'Lib/smtpd.py']
384+ scripts = ['Tools/scripts/pydoc2.7', 389+ scripts = ['Tools/scripts/pydoc2.7',
385+ 'Tools/scripts/2to3-2.7', 390+ 'Tools/scripts/2to3-2.7',
386+ 'Tools/scripts/smtpd2.7.py'] 391+ 'Tools/scripts/smtpd2.7.py']
387 ) 392 )
388  393
389 # --install-platlib 394 # --install-platlib