mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 07:40:07 +02:00
python3.10: bump version to 3.10.8. (#7313)
* python310: bump revision to 3.10.8. * Use "make altinstall". * Documented problematic tests, and skipped the ones that hang/stall. * Enable optimizations. * Added a note regarding tests that invoke the crash dialog. Running "hp --test python310" now gives the same results[*] for both non-optimized, and optimized builds, so let's just enable optimizations for 3.10.8. [*] As there's some randomness involved in the test runs, YMMV. Anecdotal/aditional info: Building and testing with "--disable-test-modules" might be considered? Python's docs read: "The test package is meant for internal use by Python only." And that those are used for regression testing mostly. See: https://docs.python.org/3/library/test.html#module-test Personal experience: I got more consistent results with that flag enabled, than witout it. I left it out, trying to avoid hiding problems (a.k.a.: failing silently. A big NO-NO in QA/QC), and because I assume that packaging Python counts as "internal use". * python310: patch tests that need several GB of storage. They now behave like on Windows or MacOSX, requiring to be enabled by the use of the "largefile" resource usage flag. * python3.10: rename package from python310 to python3.10. This matches the rename of python3 to python3.7, and the similar change for Python 3.9. Renamed patchset files to match the recipe naming. Sorted sections according to the Haikuporter Guidelines.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 62ed086ee059b4926f2de439d241f8ee2ab72ff6 Mon Sep 17 00:00:00 2001
|
||||
From 177367d9679fe27e9a38c251bd0e072f85aa7fb3 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
|
||||
@@ -152,7 +152,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 939893e..51f375e 100644
|
||||
index 939893e..108918a 100644
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -281,6 +281,14 @@ def _getuserbase():
|
||||
@@ -250,7 +250,7 @@ index 4269b0e..314aa75 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 ee85f35..445ad51 100644
|
||||
index 8ee44bf..9953cc7 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -141,7 +141,7 @@ BINDIR= @bindir@
|
||||
@@ -362,10 +362,10 @@ index 0d69c29..02f692d 100644
|
||||
#endif
|
||||
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
index ab8618b..b2aee8b 100644
|
||||
index 6a9ac2c..e696af1 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -7464,7 +7464,9 @@ PyInit__socket(void)
|
||||
@@ -7473,7 +7473,9 @@ PyInit__socket(void)
|
||||
/* SOCK_RAW is marked as optional in the POSIX specification */
|
||||
PyModule_AddIntMacro(m, SOCK_RAW);
|
||||
#endif
|
||||
@@ -416,10 +416,10 @@ index acea306..050a3d0 100644
|
||||
else
|
||||
PyErr_SetString(PyExc_KeyError, "getspnam(): name not found");
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0c06914..d3d980c 100644
|
||||
index cc69015..310e434 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1154,6 +1154,16 @@ if test $enable_shared = "yes"; then
|
||||
@@ -1159,6 +1159,16 @@ if test $enable_shared = "yes"; then
|
||||
PY3LIBRARY=libpython3.so
|
||||
fi
|
||||
;;
|
||||
@@ -436,7 +436,7 @@ index 0c06914..d3d980c 100644
|
||||
hp*|HP*)
|
||||
case `uname -m` in
|
||||
ia64)
|
||||
@@ -1229,6 +1239,7 @@ AC_PROG_MKDIR_P
|
||||
@@ -1234,6 +1244,7 @@ AC_PROG_MKDIR_P
|
||||
AC_SUBST(LN)
|
||||
if test -z "$LN" ; then
|
||||
case $ac_sys_system in
|
||||
@@ -444,7 +444,7 @@ index 0c06914..d3d980c 100644
|
||||
CYGWIN*) LN="ln -s";;
|
||||
*) LN=ln;;
|
||||
esac
|
||||
@@ -2707,7 +2718,7 @@ then
|
||||
@@ -2712,7 +2723,7 @@ then
|
||||
BLDSHARED="$LDSHARED"
|
||||
fi
|
||||
;;
|
||||
@@ -453,7 +453,7 @@ index 0c06914..d3d980c 100644
|
||||
LDSHARED='$(CC) -shared'
|
||||
LDCXXSHARED='$(CXX) -shared';;
|
||||
FreeBSD*)
|
||||
@@ -2774,7 +2785,7 @@ then
|
||||
@@ -2779,7 +2790,7 @@ then
|
||||
else CCSHARED="+z";
|
||||
fi;;
|
||||
Linux-android*) ;;
|
||||
@@ -462,7 +462,7 @@ index 0c06914..d3d980c 100644
|
||||
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
|
||||
OpenUNIX*|UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
@@ -2802,7 +2813,7 @@ then
|
||||
@@ -2807,7 +2818,7 @@ then
|
||||
LINKFORSHARED="-Wl,-E -Wl,+s";;
|
||||
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
|
||||
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
|
||||
@@ -471,7 +471,7 @@ index 0c06914..d3d980c 100644
|
||||
# -u libsys_s pulls in all symbols in libsys
|
||||
Darwin/*)
|
||||
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
|
||||
@@ -3074,6 +3085,12 @@ AC_SUBST(TZPATH)
|
||||
@@ -3079,6 +3090,12 @@ AC_SUBST(TZPATH)
|
||||
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
|
||||
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
|
||||
|
||||
@@ -484,7 +484,7 @@ index 0c06914..d3d980c 100644
|
||||
AC_MSG_CHECKING(for --with-libs)
|
||||
AC_ARG_WITH(libs,
|
||||
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
|
||||
@@ -4467,6 +4484,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
@@ -4471,6 +4488,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
@@ -493,7 +493,7 @@ index 0c06914..d3d980c 100644
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 43e807f..6834df3 100644
|
||||
index 85a2b26..2779048 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -86,6 +86,7 @@ CYGWIN = (HOST_PLATFORM == 'cygwin')
|
||||
@@ -504,7 +504,7 @@ index 43e807f..6834df3 100644
|
||||
CC = os.environ.get("CC")
|
||||
if not CC:
|
||||
CC = sysconfig.get_config_var("CC")
|
||||
@@ -868,6 +869,11 @@ class PyBuildExt(build_ext):
|
||||
@@ -869,6 +870,11 @@ class PyBuildExt(build_ext):
|
||||
with open(config_h) as file:
|
||||
self.config_h_vars = sysconfig.parse_config_h(file)
|
||||
|
||||
@@ -516,7 +516,7 @@ index 43e807f..6834df3 100644
|
||||
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
||||
if HOST_PLATFORM in ['osf1', 'unixware7', 'openunix8']:
|
||||
self.lib_dirs += ['/usr/ccs/lib']
|
||||
@@ -914,14 +920,14 @@ class PyBuildExt(build_ext):
|
||||
@@ -915,14 +921,14 @@ class PyBuildExt(build_ext):
|
||||
extra_compile_args=['-DPy_BUILD_CORE_MODULE'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
@@ -533,7 +533,7 @@ index 43e807f..6834df3 100644
|
||||
|
||||
# time libraries: librt may be needed for clock_gettime()
|
||||
time_libs = []
|
||||
@@ -935,7 +941,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -936,7 +942,7 @@ class PyBuildExt(build_ext):
|
||||
# libm is needed by delta_new() that uses round() and by accum() that
|
||||
# uses modf().
|
||||
self.add(Extension('_datetime', ['_datetimemodule.c'],
|
||||
@@ -542,7 +542,7 @@ index 43e807f..6834df3 100644
|
||||
extra_compile_args=['-DPy_BUILD_CORE_MODULE']))
|
||||
# zoneinfo module
|
||||
self.add(Extension('_zoneinfo', ['_zoneinfo.c'],
|
||||
@@ -1028,7 +1034,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -1029,7 +1035,7 @@ class PyBuildExt(build_ext):
|
||||
#
|
||||
# audioop needs libm for floor() in multiple functions.
|
||||
self.add(Extension('audioop', ['audioop.c'],
|
||||
@@ -551,7 +551,7 @@ index 43e807f..6834df3 100644
|
||||
|
||||
# CSV files
|
||||
self.add(Extension('_csv', ['_csv.c']))
|
||||
@@ -2265,7 +2271,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2269,7 +2275,7 @@ class PyBuildExt(build_ext):
|
||||
# function my_sqrt() needs libm for sqrt()
|
||||
self.add(Extension('_ctypes_test',
|
||||
sources=['_ctypes/_ctypes_test.c'],
|
||||
@@ -560,7 +560,7 @@ index 43e807f..6834df3 100644
|
||||
|
||||
ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
|
||||
ffi_lib = None
|
||||
@@ -2330,7 +2336,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2334,7 +2340,7 @@ class PyBuildExt(build_ext):
|
||||
'Modules',
|
||||
'_decimal',
|
||||
'libmpdec'))]
|
||||
@@ -569,7 +569,7 @@ index 43e807f..6834df3 100644
|
||||
sources = [
|
||||
'_decimal/_decimal.c',
|
||||
'_decimal/libmpdec/basearith.c',
|
||||
@@ -2587,7 +2593,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2591,7 +2597,7 @@ class PyBuildExt(build_ext):
|
||||
))
|
||||
|
||||
def detect_nis(self):
|
||||
@@ -579,20 +579,20 @@ index 43e807f..6834df3 100644
|
||||
return
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From d9cebf903832a1f364da9b702bcf17767ece7acd Mon Sep 17 00:00:00 2001
|
||||
From 1f4b6ce5cad2a030114c646952dbc148abc8f865 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sun, 16 Apr 2017 10:05:42 +0200
|
||||
Subject: fix for negative errnos
|
||||
|
||||
|
||||
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
|
||||
index ccb46a6..4a8ef65 100644
|
||||
index ffe9170..d1aca2c 100644
|
||||
--- a/Lib/subprocess.py
|
||||
+++ b/Lib/subprocess.py
|
||||
@@ -1830,6 +1830,8 @@ class Popen:
|
||||
@@ -1835,6 +1835,8 @@ class Popen:
|
||||
SubprocessError)
|
||||
if issubclass(child_exception_type, OSError) and hex_errno:
|
||||
errno_num = int(hex_errno, 16)
|
||||
@@ -602,7 +602,7 @@ index ccb46a6..4a8ef65 100644
|
||||
if child_exec_never_called:
|
||||
err_msg = ""
|
||||
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
|
||||
index a58159a..aa938be 100644
|
||||
index b852ad7..60d4a6e 100644
|
||||
--- a/Modules/_posixsubprocess.c
|
||||
+++ b/Modules/_posixsubprocess.c
|
||||
@@ -623,6 +623,10 @@ error:
|
||||
@@ -617,10 +617,10 @@ index a58159a..aa938be 100644
|
||||
*--cur = Py_hexdigits[saved_errno % 16];
|
||||
saved_errno /= 16;
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From b6d2c9b36b2a2560e164f5a3026bbf8ca5aea368 Mon Sep 17 00:00:00 2001
|
||||
From 827ba2ca9d05f29cba3506bf1ad9de9b83e45585 Mon Sep 17 00:00:00 2001
|
||||
From: Philippe Houdoin <philippe.houdoin@gmail.com>
|
||||
Date: Wed, 24 May 2017 11:09:43 +0000
|
||||
Subject: Implement CTypes's find_library for Haiku
|
||||
@@ -701,10 +701,10 @@ index 0c2510e..2b4f04c 100644
|
||||
print(cdll.LoadLibrary("libm.so"))
|
||||
print(cdll.LoadLibrary("libcrypt.so"))
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From 2c1eddce5a0e37a961428a0745c6fd67ab6fae63 Mon Sep 17 00:00:00 2001
|
||||
From b658720a43ac7ff9be0e825fbc3ba208e717aab9 Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Wolfer <phil@parolu.io>
|
||||
Date: Mon, 23 Sep 2019 09:14:58 +0200
|
||||
Subject: webbrowser: Support for default browsers on Haiku
|
||||
@@ -727,17 +727,17 @@ index ec3cece..6a29d2a 100755
|
||||
# Prefer X browsers if present
|
||||
if os.environ.get("DISPLAY") or os.environ.get("WAYLAND_DISPLAY"):
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From e71e66cd48a32e7b41a770755b84c7a4f9dbefc2 Mon Sep 17 00:00:00 2001
|
||||
From 9a9b8f003e77bed5cb9c41a12b06b20b7e6ad91a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 4 Oct 2019 22:02:35 +0200
|
||||
Subject: since 3.8, don't reinit locks on fork.
|
||||
|
||||
|
||||
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
|
||||
index 555f598..f151fd0 100644
|
||||
index 09810bd..0a92e3f 100644
|
||||
--- a/Lib/logging/__init__.py
|
||||
+++ b/Lib/logging/__init__.py
|
||||
@@ -235,7 +235,7 @@ def _releaseLock():
|
||||
@@ -750,10 +750,10 @@ index 555f598..f151fd0 100644
|
||||
pass # no-op when os.register_at_fork does not exist.
|
||||
else:
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From 0c2158b279579bd9e01e2009b58433a774f38b55 Mon Sep 17 00:00:00 2001
|
||||
From 8f572438ad956810da6a7be3dfd433a15f95bccc Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 15 May 2020 15:20:57 +0200
|
||||
Subject: handle errors returned by internal_connect()
|
||||
@@ -761,10 +761,10 @@ Subject: handle errors returned by internal_connect()
|
||||
upstream bug #40628 by Ryan C. Gordon
|
||||
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
index b2aee8b..1c43b96 100644
|
||||
index e696af1..bf21d2e 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -3280,7 +3280,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
|
||||
@@ -3289,7 +3289,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
|
||||
}
|
||||
|
||||
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1);
|
||||
@@ -773,7 +773,7 @@ index b2aee8b..1c43b96 100644
|
||||
return NULL;
|
||||
|
||||
Py_RETURN_NONE;
|
||||
@@ -3311,7 +3311,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
|
||||
@@ -3320,7 +3320,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
|
||||
}
|
||||
|
||||
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 0);
|
||||
@@ -783,20 +783,20 @@ index b2aee8b..1c43b96 100644
|
||||
|
||||
return PyLong_FromLong((long) res);
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From 1213f8a74b3940676029784407a5acc633d83345 Mon Sep 17 00:00:00 2001
|
||||
From f89256611156df626de21c85286b4d49c7dd5705 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 19 Oct 2020 18:03:09 +0200
|
||||
Subject: ttyname_r can use MAXPATHLEN
|
||||
|
||||
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
index 03de470..663e6cc 100644
|
||||
index f92e2ae..e5b6042 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -3073,11 +3073,14 @@ static PyObject *
|
||||
@@ -3087,11 +3087,14 @@ static PyObject *
|
||||
os_ttyname_impl(PyObject *module, int fd)
|
||||
/*[clinic end generated code: output=c424d2e9d1cd636a input=9ff5a58b08115c55]*/
|
||||
{
|
||||
@@ -813,5 +813,58 @@ index 03de470..663e6cc 100644
|
||||
if (buffer == NULL) {
|
||||
return PyErr_NoMemory();
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
|
||||
From 4eecfa64d1216d685184ae2e8530254c45ea0c7f Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Fri, 21 Oct 2022 19:58:50 -0300
|
||||
Subject: Lib/test: require the "largefile" usage flag for I/O heavy tests.
|
||||
|
||||
The same was done for Windows and MacOSX already.
|
||||
|
||||
This avoids needing several GBs of storage to run the tests
|
||||
(unless they "largefile" resource usage flag is enabled).
|
||||
|
||||
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
|
||||
index fb83762..32dc8bd 100644
|
||||
--- a/Lib/test/test_io.py
|
||||
+++ b/Lib/test/test_io.py
|
||||
@@ -601,7 +601,7 @@ class IOTest(unittest.TestCase):
|
||||
# On Windows and Mac OSX this test consumes large resources; It takes
|
||||
# a long time to build the >2 GiB file and takes >2 GiB of disk space
|
||||
# therefore the resource must be enabled to run this test.
|
||||
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
|
||||
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
|
||||
support.requires(
|
||||
'largefile',
|
||||
'test requires %s bytes and a long time to run' % self.LARGE)
|
||||
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
|
||||
index 8f6bec1..dcd9678 100644
|
||||
--- a/Lib/test/test_largefile.py
|
||||
+++ b/Lib/test/test_largefile.py
|
||||
@@ -251,7 +251,7 @@ def setUpModule():
|
||||
# takes a long time to build the >2 GiB file and takes >2 GiB of disk
|
||||
# space therefore the resource must be enabled to run this test.
|
||||
# If not, nothing after this line stanza will be executed.
|
||||
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
|
||||
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
|
||||
requires('largefile',
|
||||
'test requires %s bytes and a long time to run' % str(size))
|
||||
else:
|
||||
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
|
||||
index 8f34c18..999063f 100644
|
||||
--- a/Lib/test/test_mmap.py
|
||||
+++ b/Lib/test/test_mmap.py
|
||||
@@ -806,7 +806,7 @@ class LargeMmapTests(unittest.TestCase):
|
||||
unlink(TESTFN)
|
||||
|
||||
def _make_test_file(self, num_zeroes, tail):
|
||||
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
|
||||
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
|
||||
requires('largefile',
|
||||
'test requires %s bytes and a long time to run' % str(0x180000000))
|
||||
f = open(TESTFN, 'w+b')
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -11,12 +11,12 @@ LICENSE="Python"
|
||||
COPYRIGHT="1990-2022 Python Software Foundation"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="6eed8415b7516fb2f260906db5d48dd4c06acc0cb24a7d6cc15296a604dcdc48"
|
||||
CHECKSUM_SHA256="6a30ecde59c47048013eb5a658c9b5dec277203d2793667f578df7671f7f03f3"
|
||||
SOURCE_DIR="Python-$portVersion"
|
||||
PATCHES="python310-$portVersion.patchset"
|
||||
PATCHES="python3.10-$portVersion.patchset"
|
||||
if [ "$secondaryArchSuffix" = _x86 ] ; then
|
||||
PATCHES+="
|
||||
python310_x86-$portVersion.patchset
|
||||
python3.10_x86-$portVersion.patchset
|
||||
"
|
||||
fi
|
||||
|
||||
@@ -31,7 +31,12 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
non-packaged/lib/python3.10/site-packages directory keep-old
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
python3.10$secondaryArchSuffix = $portVersion compat >= 3.10
|
||||
python310$secondaryArchSuffix = $portVersion compat >= 3.10
|
||||
cmd:2to3_3.10 = $portVersion compat >= 3.10
|
||||
cmd:idle3.10 = $portVersion compat >= 3.10
|
||||
@@ -56,6 +61,9 @@ REQUIRES="
|
||||
lib:libsqlite3$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
REPLACES="
|
||||
python310$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
@@ -82,10 +90,6 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
non-packaged/lib/python3.10/site-packages directory keep-old
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-D_BSD_SOURCE"
|
||||
@@ -95,7 +99,8 @@ BUILD()
|
||||
export OPT=""
|
||||
|
||||
runConfigure --omit-dirs binDir,includeDir ./configure \
|
||||
--enable-shared --without-ensurepip --with-system-ffi --with-readline=editline \
|
||||
--enable-shared --enable-optimizations \
|
||||
--with-ensurepip=no --with-system-ffi --with-readline=editline \
|
||||
--with-system-expat --bindir=$commandBinDir --includedir=$developDir/headers
|
||||
|
||||
# prevent make from rebuilding stuff that requires python
|
||||
@@ -108,7 +113,8 @@ BUILD()
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
# altinstall avoids clobbering $prefix/bin/{2to3,idle3,pydoc3,python3,python3-config}
|
||||
make altinstall
|
||||
|
||||
rm $libDir/libpython3.so
|
||||
|
||||
@@ -134,16 +140,96 @@ INSTALL()
|
||||
cd $prefix/lib/python3.10
|
||||
rm -rf ctypes/test distutils/tests idlelib/idle_test lib2to3/tests \
|
||||
sqlite3/test test tkinter/test unittest/test
|
||||
|
||||
rm -f $prefix/bin/{2to3,idle3,pydoc3,python3,python3-config}
|
||||
}
|
||||
|
||||
# Some of the test will crash, invoking the crash dialog, and will hang waiting for
|
||||
# user's interaction. To avoid that, make sure to configure your system by adding
|
||||
# the following lines in the file "~/config/settings/system/debug_server/settings":
|
||||
##---
|
||||
# executable_actions {
|
||||
# /sources/Python-$portVersion/python kill
|
||||
# }
|
||||
##---
|
||||
# Replace $portVersion as necessary.
|
||||
|
||||
# For some tests that purposefully crash, it would make sense to add support for
|
||||
# crash-report suppression (as done for other platforms) on "tests/support/__init__,py"'s
|
||||
# SuppressCrashReport class.
|
||||
# But that needs support from Haiku's debug_server, as we can't change settings from
|
||||
# the recipe's building environment at the moment (https://dev.haiku-os.org/ticket/10301)
|
||||
|
||||
TEST()
|
||||
{
|
||||
# Remove tests data left-overs, if any
|
||||
rm -f -r /boot/system/cache/tmp/
|
||||
rm -f -d -r build/test_python*
|
||||
|
||||
cd Lib/test
|
||||
rm -f test_asynchat.py # this one stalls, so skip it for now
|
||||
rm -f test_multiprocessing.py # this one stalls, so skip it for now
|
||||
|
||||
# The following tests invoke the crash dialog, and unless your configure
|
||||
# debug_server default action to "kill" or "report", they will hang waiting for
|
||||
# user input. See comment above TEST().
|
||||
# Otherwise... uncomment these to skip them.
|
||||
# rm -f test_asyncio/test_futures.py # Crashes: Exception (Segment violation)
|
||||
# rm -f test_faulthandler.py
|
||||
# rm -f test_subprocess.py
|
||||
# rm -f test_threading.py
|
||||
|
||||
# Many of the tests hang/stall. We have two options:
|
||||
#
|
||||
# 1- Manually remove the problematic test-cases.
|
||||
# 2- Set a TIMEOUT.
|
||||
#
|
||||
# Option 1: Works, but requires manual identification/mainteinance.
|
||||
#
|
||||
# Option 2: Doesn't requires maintaining a list of stalling tests, but:
|
||||
# - Causes errors at the end of the run:
|
||||
# "unmounting failed: Device/File/Resource Busy"
|
||||
# - Leaves dangling threads running when the tests timeout:
|
||||
# "Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 2)"
|
||||
# - The time it takes to run the full suite goes from 14 to 30+ minutes,
|
||||
#
|
||||
# For Option 2, use: export EXTRATESTOPTS="--timeout=300"
|
||||
# before calling "make $jobArgs test".
|
||||
#
|
||||
# Let's use Option 1, for now at least:
|
||||
|
||||
# These hang reliably.
|
||||
# You might want then to manually restore them on re-runs, use:
|
||||
# > git checkout -- Lib/test/
|
||||
rm -f test__xxsubinterpreters.py
|
||||
rm -f test_asynchat.py
|
||||
rm -f test_concurrent_futures.py
|
||||
rm -f test_importlib/test_threaded_import.py
|
||||
rm -f test_interpreters.py
|
||||
rm -f test_multiprocessing_fork.py
|
||||
rm -f test_multiprocessing_forkserver.py
|
||||
rm -f test_multiprocessing_main_handling.py
|
||||
rm -f test_multiprocessing_spawn.py
|
||||
rm -f test_multiprocessing.py
|
||||
rm -f test_socketserver.py
|
||||
|
||||
# "test_asyncio" doesn't seems to runs reliably, even after individually skipping
|
||||
# all the problematic test-cases that could be identify by running them one by one.
|
||||
rm -f -r test_asyncio
|
||||
# rm -f test_asyncio/test_base_events.py
|
||||
# rm -f test_asyncio/test_buffered_proto.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_events.py
|
||||
# rm -f test_asyncio/test_sendfile.py
|
||||
# rm -f test_asyncio/test_server.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_sslproto.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_streams.py
|
||||
|
||||
# These not always hang/stall, but they do it enough to warrant skipping for now.
|
||||
rm -f test_imaplib.py
|
||||
rm -f test_signal.py
|
||||
rm -f test_socket.py
|
||||
rm -f test_ssl.py
|
||||
rm -f test_urllib2_localnet.py
|
||||
|
||||
cd ../..
|
||||
|
||||
# We could enable/disable certain tests by "resource" type:
|
||||
# export EXTRATESTOPTS="-u all,-largefile,-audio,-gui,-network,-cpu,-urlfetch,-tzdata"
|
||||
make $jobArgs test
|
||||
}
|
||||
Reference in New Issue
Block a user