diff --git a/system/base/python/actions.py b/system/base/python/actions.py index 5b2d6481..c4089504 100644 --- a/system/base/python/actions.py +++ b/system/base/python/actions.py @@ -16,6 +16,19 @@ WorkDir = "Python-%s" % get.srcVERSION() PythonVersion = "2.7" def setup(): + shelltools.system("echo -e '\033[0;36mBuilding OpenSSL\033[0m' ") + shelltools.cd("openssl-1.1.1d") + shelltools.system("./Configure --prefix=%s/temp --openssldir=%s/temp/etc/ssl --libdir=lib no-shared linux-x86_64 -Wa,--noexecstack" %(get.workDIR(), get.workDIR())) + autotools.make() + autotools.make("install") + shelltools.cd("..") + shelltools.system("echo -e '\033[0;36mBuilding Bzip2\033[0m' ") + shelltools.cd("bzip2-1.0.8") + autotools.make('CC=%s AR=%s RANLIB=%s CFLAGS="%s -D_FILE_OFFSET_BITS=64 -fPIC" libbz2.a' % (get.CC(), get.AR(), get.RANLIB(), get.CFLAGS())) + shelltools.system("cp libbz2.a %s/temp/lib" % get.workDIR()) + shelltools.cd("..") + + pisitools.cflags.add("-fwrapv") # no rpath @@ -29,6 +42,8 @@ def setup(): "_ctypes/libffi_osx","_ctypes/libffi","_ctypes/darwin"]: shelltools.unlinkDir("Modules/%s" % dir) + shelltools.export("CFLAGS", "-I%s/temp/include -O3" %get.workDIR()) + shelltools.export("LDFLAGS", "-L%s/temp/lib -lssl -lcrypto -lbz2 -lpthread -ldl" %get.workDIR()) autotools.autoreconf("-vif") # disable bsddb @@ -61,5 +76,6 @@ def install(): pisitools.dosym("/usr/bin/python%s" % PythonVersion, "/usr/bin/python") pisitools.dosym("/usr/bin/python%s-config" % PythonVersion, "/usr/bin/python-config") pisitools.dosym("/usr/lib/python%s/pdb.py" % PythonVersion, "/usr/bin/pdb") + #pisitools.domove("/usr/lib/python2.7/lib-dynload/bz2_failed.so", "/usr/lib/python2.7/lib-dynload", "bz2.so") pisitools.dodoc("LICENSE", "README") diff --git a/system/base/python/files/allowZip64.patch b/system/base/python/files/allowZip64.patch new file mode 100644 index 00000000..4389f868 --- /dev/null +++ b/system/base/python/files/allowZip64.patch @@ -0,0 +1,12 @@ +diff -Nru Python-2.7.17.orig/Lib/zipfile.py Python-2.7.17/Lib/zipfile.py +--- Python-2.7.17.orig/Lib/zipfile.py 2019-10-19 21:38:44.000000000 +0300 ++++ Python-2.7.17/Lib/zipfile.py 2019-11-18 00:43:00.452488503 +0300 +@@ -746,7 +746,7 @@ + + fp = None # Set here since __del__ checks it + +- def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=False): ++ def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True): + """Open the ZIP file with mode read "r", write "w" or append "a".""" + if mode not in ("r", "w", "a"): + raise RuntimeError('ZipFile() requires mode "r", "w", or "a"') diff --git a/system/base/python/pspec.xml b/system/base/python/pspec.xml old mode 100644 new mode 100755 index 5bcb0272..163dc956 --- a/system/base/python/pspec.xml +++ b/system/base/python/pspec.xml @@ -12,7 +12,9 @@ app:console An interpreted, interactive, object-orientated programming language Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. - http://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz + https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tar.xz + ftp://ftp.openssl.org/source/openssl-1.1.1d.tar.gz + https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz bzip2 @@ -38,6 +40,7 @@ disable-egginfo.patch trfix_emaillib.patch + allowZip64.patch @@ -133,6 +136,13 @@ --> + + 2019-10-25- + 2.7.17 + Ver bump + Idris Kalp + idriskalp@gmail.com + 2018-07-15 2.7.15