python: bump versions for 2.x and 3.x.

This commit is contained in:
Jerome Duval
2016-07-26 05:59:09 +00:00
parent 39c22033ab
commit 8e4d8f6b6d
4 changed files with 91 additions and 68 deletions

View File

@@ -1,4 +1,4 @@
From 87c88af3eef31c978cecf0d96665af0c4109d7e5 Mon Sep 17 00:00:00 2001
From c0a96d9df40b6b648dede4fd54ce52c6bef67e1e Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 12 Mar 2014 21:17:06 +0000
Subject: initial Haiku patch
@@ -465,10 +465,10 @@ index 0000000..d9da80c
+set -v
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index b45d79b..d1f77f7 100644
index e21e47f..7baf562 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -299,6 +299,7 @@ class OtherFileTests(unittest.TestCase):
@@ -308,6 +308,7 @@ class OtherFileTests(unittest.TestCase):
self.assertEqual(f.writable(), True)
if sys.platform != "darwin" and \
'bsd' not in sys.platform and \
@@ -497,10 +497,10 @@ index 53a6c3e..6c5f52f 100644
if (PyErr_Occurred()) {
Py_DECREF(result);
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index e9e4479..84b6305 100644
index 5def531..5e3e5cc 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4869,7 +4869,9 @@ init_socket(void)
@@ -4871,7 +4871,9 @@ init_socket(void)
#ifndef __BEOS__
/* We have incomplete socket support. */
PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW);
@@ -571,7 +571,7 @@ index f052574..6a77f0d 100644
#else
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index c64501e..7df3ad7 100755
index 40b1bce..4185370 100755
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -50,7 +50,7 @@ except KeyError:
@@ -584,10 +584,10 @@ index c64501e..7df3ad7 100755
elif sys.platform.startswith("atheos"):
searchdirs=os.environ['C_INCLUDE_PATH'].split(':')
diff --git a/configure.ac b/configure.ac
index 94a215e..41fbd47 100644
index 78fe3c7..09f4249 100644
--- a/configure.ac
+++ b/configure.ac
@@ -886,7 +886,7 @@ if test $enable_shared = "yes"; then
@@ -889,7 +889,7 @@ if test $enable_shared = "yes"; then
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
@@ -596,7 +596,7 @@ index 94a215e..41fbd47 100644
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
@@ -894,6 +894,9 @@ if test $enable_shared = "yes"; then
@@ -897,6 +897,9 @@ if test $enable_shared = "yes"; then
FreeBSD*)
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
;;
@@ -606,7 +606,7 @@ index 94a215e..41fbd47 100644
esac
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
@@ -1009,7 +1012,7 @@ AC_PROG_MKDIR_P
@@ -1012,7 +1015,7 @@ AC_PROG_MKDIR_P
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
@@ -615,7 +615,7 @@ index 94a215e..41fbd47 100644
CYGWIN*) LN="ln -s";;
atheos*) LN="ln -s";;
*) LN=ln;;
@@ -2033,7 +2036,7 @@ then
@@ -2036,7 +2039,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
@@ -624,7 +624,7 @@ index 94a215e..41fbd47 100644
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
BSD/OS*/4*)
@@ -2105,7 +2108,7 @@ then
@@ -2108,7 +2111,7 @@ then
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
@@ -633,7 +633,7 @@ index 94a215e..41fbd47 100644
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
@@ -2137,7 +2140,7 @@ then
@@ -2140,7 +2143,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
@@ -642,7 +642,7 @@ index 94a215e..41fbd47 100644
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
# -u _PyMac_Error is needed to pull in the mac toolbox glue,
@@ -2252,14 +2255,16 @@ case "$ac_sys_system" in
@@ -2258,14 +2261,16 @@ case "$ac_sys_system" in
esac
# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
@@ -663,7 +663,7 @@ index 94a215e..41fbd47 100644
esac
AC_MSG_CHECKING(for --with-libs)
@@ -3595,7 +3600,7 @@ fi],
@@ -3602,7 +3607,7 @@ fi],
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
@@ -673,7 +673,7 @@ index 94a215e..41fbd47 100644
esac
AC_MSG_CHECKING(for --with-libm=STRING)
diff --git a/setup.py b/setup.py
index 7868b7b..bc4a1a4 100644
index 6a6ad23..6bc6782 100644
--- a/setup.py
+++ b/setup.py
@@ -525,6 +525,12 @@ class PyBuildExt(build_ext):
@@ -759,14 +759,14 @@ index 7868b7b..bc4a1a4 100644
1.8.3.4
From 6347fda5298f9aa5eca939541924464fcf8a19d1 Mon Sep 17 00:00:00 2001
From 8348c402f7f409e3024c78381c1d4e1f842ae448 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 5 Apr 2014 21:16:40 +0000
Subject: fix pyconfig.h path
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7f4ec2f..25a93e5 100644
index b3b2b36..77340fd 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -105,7 +105,7 @@ BINDIR= @bindir@
@@ -782,7 +782,7 @@ index 7f4ec2f..25a93e5 100644
1.8.3.4
From 5e90b750c4bfef1376bb083d48524c41fc5fefa6 Mon Sep 17 00:00:00 2001
From 2f77b7b4f848d6b85cffa3f31c5f1c0026b64e64 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 18 Jun 2014 12:19:13 +0000
Subject: Import missed change from the 2.6.9 patches
@@ -793,7 +793,7 @@ expected with
this version of Python.
diff --git a/Lib/site.py b/Lib/site.py
index d2e18f1..34d5aee 100644
index 4a09f3c..4b6e01e 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -287,6 +287,13 @@ def getsitepackages():
@@ -814,7 +814,7 @@ index d2e18f1..34d5aee 100644
1.8.3.4
From 307d21aa5ea6336db7ec3dd9429436441b61ab8d Mon Sep 17 00:00:00 2001
From ef5bdbe6e87e4b5ad6b541c65051f8f13e392676 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 21 Sep 2014 18:59:44 +0200
Subject: gcc2 fix.
@@ -837,17 +837,17 @@ index 37f5a9e..37b0b25 100644
1.8.3.4
From b1aabdb8e27c669873ec393344389aa343a6aeab Mon Sep 17 00:00:00 2001
From 529eb791f594d7559a63b6088efea078fa012e7f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 28 Nov 2014 16:26:28 +0000
Subject: tarfile: let link fail and catch exception.
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index b0d1292..b5952ae 100644
index 082f361..4451189 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -2261,7 +2261,7 @@ class TarFile(object):
@@ -2263,7 +2263,7 @@ class TarFile(object):
(platform limitation), we try to make a copy of the referenced file
instead of a link.
"""
@@ -856,7 +856,7 @@ index b0d1292..b5952ae 100644
# For systems that support symbolic and hard links.
if tarinfo.issym():
if os.path.lexists(targetpath):
@@ -2275,7 +2275,7 @@ class TarFile(object):
@@ -2277,7 +2277,7 @@ class TarFile(object):
os.link(tarinfo._link_target, targetpath)
else:
self._extract_member(self._find_link_target(tarinfo), targetpath)
@@ -869,7 +869,7 @@ index b0d1292..b5952ae 100644
1.8.3.4
From 5398326cd9e24ca71a025f48ea0079b8d40456ec Mon Sep 17 00:00:00 2001
From 2f5996ce4a51079584b6d7b4d1dfba9e8e8fb018 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sun, 11 Jan 2015 18:18:22 -0800
Subject: Fix resource module after the initial haiku patch
@@ -905,7 +905,7 @@ index 6c5f52f..73758bb 100644
1.8.3.4
From 6d7958a9371618a6b7a53f8de6b71633be2af7c3 Mon Sep 17 00:00:00 2001
From 57c574a0ce25088f026dffbb9abc06f7b7610a98 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sun, 11 Jan 2015 18:40:43 -0800
Subject: resource: Fix [gs]et_rlimit() modes detection
@@ -983,3 +983,26 @@ index 73758bb..0c396f6 100644
--
1.8.3.4
From d9e84b7fdfc5a049e471f63ea49763785b574ee7 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 26 May 2015 19:39:55 +0000
Subject: Haiku hasn't makedev(), _PyInt_FromDev isn't defined.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 4e86d32..ffe0db1 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1483,6 +1483,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
#endif
#ifdef MS_WINDOWS
PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));
+#elif defined(__HAIKU__)
+ PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong(st->st_dev));
#else
PyStructSequence_SET_ITEM(v, 2, _PyInt_FromDev(st->st_dev));
#endif
--
1.8.3.4

View File

@@ -1,4 +1,4 @@
From d24b6c3f386c989c75e5bab0d661e8a1666e9cc2 Mon Sep 17 00:00:00 2001
From 9cc9c2f44cb3826ae0249420aafcb8caf7370211 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 10 Apr 2014 16:03:33 +0000
Subject: initial Haiku patch
@@ -136,7 +136,7 @@ index 0000000..4372ee2
+set -v
+eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" $HEADERS/posix/netinet/in.h
diff --git a/Lib/site.py b/Lib/site.py
index 6f66c07..f892171 100644
index 3f78ef5..e2616e8 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -302,7 +302,14 @@ def getsitepackages(prefixes=None):
@@ -168,10 +168,10 @@ index 59cc38f..4a6d0ca 100644
# Somehow /dev/tty appears seekable on some BSDs
self.assertEqual(f.seekable(), False)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ce2c0aa..311841c 100644
index 87528a0..4fa024e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -119,7 +119,7 @@ BINDIR= @bindir@
@@ -124,7 +124,7 @@ BINDIR= @bindir@
LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
@@ -181,10 +181,10 @@ index ce2c0aa..311841c 100644
ABIFLAGS= @ABIFLAGS@
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ec8c526..ad855e6 100644
index e5f58ab..9dc5675 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12750,7 +12750,7 @@ all_ins(PyObject *m)
@@ -12756,7 +12756,7 @@ all_ins(PyObject *m)
if (PyModule_AddIntMacro(m, SCHED_FIFO)) return -1;
if (PyModule_AddIntMacro(m, SCHED_RR)) return -1;
#ifdef SCHED_SPORADIC
@@ -293,10 +293,10 @@ index 3a1cf09..bb56e30 100644
#endif
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index ee24907..6977775 100644
index 8f571a2..8f565bc 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -6395,7 +6395,9 @@ PyInit__socket(void)
@@ -6439,7 +6439,9 @@ PyInit__socket(void)
PyModule_AddIntMacro(m, SOCK_DGRAM);
/* We have incomplete socket support. */
PyModule_AddIntMacro(m, SOCK_RAW);
@@ -336,7 +336,7 @@ index 49324d5..5fb3741 100644
SETI(setIndex++, p->sp_max);
SETI(setIndex++, p->sp_warn);
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 2f22209..581dea5 100644
index f3d0c9a..d1162bf 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -24,7 +24,7 @@
@@ -374,10 +374,10 @@ index 0967fc2..e30a59a 100755
def main():
global filedict
diff --git a/configure.ac b/configure.ac
index 56a73df..ef4cbf4 100644
index 1c07c05..44b3a67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1100,6 +1100,16 @@ if test $enable_shared = "yes"; then
@@ -1118,6 +1118,16 @@ if test $enable_shared = "yes"; then
PY3LIBRARY=libpython3.so
fi
;;
@@ -394,7 +394,7 @@ index 56a73df..ef4cbf4 100644
hp*|HP*)
case `uname -m` in
ia64)
@@ -1193,6 +1203,7 @@ AC_PROG_MKDIR_P
@@ -1211,6 +1221,7 @@ AC_PROG_MKDIR_P
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
@@ -402,7 +402,7 @@ index 56a73df..ef4cbf4 100644
CYGWIN*) LN="ln -s";;
*) LN=ln;;
esac
@@ -2243,7 +2254,7 @@ then
@@ -2368,7 +2379,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
@@ -411,7 +411,7 @@ index 56a73df..ef4cbf4 100644
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
BSD/OS*/4*)
@@ -2312,7 +2323,7 @@ then
@@ -2437,7 +2448,7 @@ then
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
@@ -420,16 +420,16 @@ index 56a73df..ef4cbf4 100644
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
@@ -2343,7 +2354,7 @@ then
@@ -2468,7 +2479,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*|GNU*|Haiku*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
@@ -2528,6 +2539,12 @@ LDFLAGS="-fsanitize=address $LDFLAGS"
@@ -2653,6 +2664,12 @@ LDFLAGS="-fsanitize=address $LDFLAGS"
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
@@ -442,7 +442,7 @@ index 56a73df..ef4cbf4 100644
AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
@@ -3873,6 +3890,7 @@ fi],
@@ -3998,6 +4015,7 @@ fi],
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
@@ -451,10 +451,21 @@ index 56a73df..ef4cbf4 100644
esac
AC_MSG_CHECKING(for --with-libm=STRING)
diff --git a/setup.py b/setup.py
index da67731..9781651 100644
index 174ce72..d83a809 100644
--- a/setup.py
+++ b/setup.py
@@ -541,6 +541,12 @@ class PyBuildExt(build_ext):
@@ -481,8 +481,8 @@ class PyBuildExt(build_ext):
os.unlink(tmpfile)
def detect_math_libs(self):
- # Check for MacOS X, which doesn't need libm.a at all
- if host_platform == 'darwin':
+ # Check for MacOS X and Haiku, which doesn't need libm.a at all
+ if host_platform in ['darwin','haiku1']:
return []
else:
return ['m']
@@ -564,6 +564,12 @@ class PyBuildExt(build_ext):
config_h_vars = sysconfig.parse_config_h(file)
srcdir = sysconfig.get_config_var('srcdir')
@@ -467,19 +478,7 @@ index da67731..9781651 100644
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if host_platform in ['osf1', 'unixware7', 'openunix8']:
@@ -568,9 +574,9 @@ class PyBuildExt(build_ext):
if item.startswith('-L'):
lib_dirs.append(item[2:])
- # Check for MacOS X, which doesn't need libm.a at all
+ # Check for MacOS X and Haiku, which don't need libm.a at all
math_libs = ['m']
- if host_platform == 'darwin':
+ if host_platform in ['darwin','haiku1']:
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -782,15 +788,22 @@ class PyBuildExt(build_ext):
@@ -812,15 +818,22 @@ class PyBuildExt(build_ext):
'/usr/local/ssl/include',
'/usr/contrib/ssl/include/'
]
@@ -505,7 +504,7 @@ index da67731..9781651 100644
['/usr/local/ssl/lib',
'/usr/contrib/ssl/lib/'
] )
@@ -798,8 +811,8 @@ class PyBuildExt(build_ext):
@@ -828,8 +841,8 @@ class PyBuildExt(build_ext):
if (ssl_incs is not None and
ssl_libs is not None):
exts.append( Extension('_ssl', ['_ssl.c'],
@@ -516,7 +515,7 @@ index da67731..9781651 100644
libraries = ['ssl', 'crypto'],
depends = ['socketmodule.h']), )
else:
@@ -839,8 +852,8 @@ class PyBuildExt(build_ext):
@@ -869,8 +882,8 @@ class PyBuildExt(build_ext):
# of hash functions from the OpenSSL library.
exts.append( Extension('_hashlib', ['_hashopenssl.c'],
depends = ['hashlib.h'],
@@ -527,7 +526,7 @@ index da67731..9781651 100644
libraries = ['ssl', 'crypto']) )
else:
print("warning: openssl 0x%08x is too old for _hashlib" %
@@ -1274,7 +1287,7 @@ class PyBuildExt(build_ext):
@@ -1304,7 +1317,7 @@ class PyBuildExt(build_ext):
exts.append( Extension('resource', ['resource.c']) )
# Sun yellow pages. Some systems have the functions in libc.
@@ -537,5 +536,5 @@ index da67731..9781651 100644
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
libs = ['nsl']
--
1.8.3.4
2.2.2

View File

@@ -12,8 +12,8 @@ HOMEPAGE="http://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2012, Python Software Foundation"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916"
REVISION="3"
CHECKSUM_SHA256="d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="python-$portVersion.patchset"
@@ -84,7 +84,8 @@ BUILD()
--enable-unicode=ucs4
# prevent make from rebuilding stuff that requires python
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h \
Python/opcode_targets.h
make $jobArgs
}

View File

@@ -12,7 +12,7 @@ HOMEPAGE="http://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2015, Python Software Foundation"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
CHECKSUM_SHA256="0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
REVISION="1"
ARCHITECTURES="x86 x86_64 x86_gcc2"
SECONDARY_ARCHITECTURES="!x86"