mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
python3.10: update to 3.10.10, sync both _getuserbase() copies. (#7946)
This addresses the "small caveat" issue mentioned on #7531 that affects all python versions, by making sure that both site.py's and sysconfig.py's copies of _getuserbase() have the same code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 5ce4ac57fe4bba0680f3788307531b72cc5a613a Mon Sep 17 00:00:00 2001
|
||||
From c1ee28b070c7e21abdc0775170e55cc6a2e9a1d6 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
|
||||
@@ -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 8ee44bf..9953cc7 100644
|
||||
index 51c31b9..baffc7d 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 6a9ac2c..e696af1 100644
|
||||
index 0762a8d..e104107 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -7473,7 +7473,9 @@ PyInit__socket(void)
|
||||
@@ -7477,7 +7477,9 @@ PyInit__socket(void)
|
||||
/* SOCK_RAW is marked as optional in the POSIX specification */
|
||||
PyModule_AddIntMacro(m, SOCK_RAW);
|
||||
#endif
|
||||
@@ -416,7 +416,7 @@ index acea306..050a3d0 100644
|
||||
else
|
||||
PyErr_SetString(PyExc_KeyError, "getspnam(): name not found");
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cc69015..310e434 100644
|
||||
index ac3be38..d8ce1f1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1159,6 +1159,16 @@ if test $enable_shared = "yes"; then
|
||||
@@ -484,7 +484,7 @@ index cc69015..310e434 100644
|
||||
AC_MSG_CHECKING(for --with-libs)
|
||||
AC_ARG_WITH(libs,
|
||||
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
|
||||
@@ -4471,6 +4488,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
@@ -4472,6 +4489,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
@@ -493,7 +493,7 @@ index cc69015..310e434 100644
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 85a2b26..2779048 100644
|
||||
index a39610a..d928e3a 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -86,6 +86,7 @@ CYGWIN = (HOST_PLATFORM == 'cygwin')
|
||||
@@ -551,7 +551,7 @@ index 85a2b26..2779048 100644
|
||||
|
||||
# CSV files
|
||||
self.add(Extension('_csv', ['_csv.c']))
|
||||
@@ -2269,7 +2275,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2272,7 +2278,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 85a2b26..2779048 100644
|
||||
|
||||
ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
|
||||
ffi_lib = None
|
||||
@@ -2334,7 +2340,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2337,7 +2343,7 @@ class PyBuildExt(build_ext):
|
||||
'Modules',
|
||||
'_decimal',
|
||||
'libmpdec'))]
|
||||
@@ -569,7 +569,7 @@ index 85a2b26..2779048 100644
|
||||
sources = [
|
||||
'_decimal/_decimal.c',
|
||||
'_decimal/libmpdec/basearith.c',
|
||||
@@ -2591,7 +2597,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2594,7 +2600,7 @@ class PyBuildExt(build_ext):
|
||||
))
|
||||
|
||||
def detect_nis(self):
|
||||
@@ -582,7 +582,7 @@ index 85a2b26..2779048 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From d15872aa930ea7a0e42a145454ca41f14526d709 Mon Sep 17 00:00:00 2001
|
||||
From d61ffd50efa383b6f983a2453b8c4ace1dfd08a6 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
|
||||
@@ -620,7 +620,7 @@ index b852ad7..60d4a6e 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From ccd4b2e0cf61ab674a4b864bba648087369ba613 Mon Sep 17 00:00:00 2001
|
||||
From 6ea969a9e922cc0d4d13264b64f53bfcceab43ec 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
|
||||
@@ -704,7 +704,7 @@ index 0c2510e..2b4f04c 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From b1efc397bf39f9b5b7d1ea2d81cf8c5294175a38 Mon Sep 17 00:00:00 2001
|
||||
From 5884e1af85f794460b3fba171265d2e3afb96e6a 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
|
||||
@@ -730,14 +730,14 @@ index ec3cece..6a29d2a 100755
|
||||
2.37.3
|
||||
|
||||
|
||||
From 684ee60b5a0d68cda9092b3f0aca58863aea06c8 Mon Sep 17 00:00:00 2001
|
||||
From eca15b55454d2fc30bb9733d3b95d7216a20ff25 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 09810bd..0a92e3f 100644
|
||||
index d1d4333..bfe60ca 100644
|
||||
--- a/Lib/logging/__init__.py
|
||||
+++ b/Lib/logging/__init__.py
|
||||
@@ -235,7 +235,7 @@ def _releaseLock():
|
||||
@@ -753,7 +753,7 @@ index 09810bd..0a92e3f 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From 9a9cc07bd85eeb2d44839a676a87ed29e7c9a47a Mon Sep 17 00:00:00 2001
|
||||
From ff1c07348e3b4569eaa8321e8ac7763b7fa031f2 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 e696af1..bf21d2e 100644
|
||||
index e104107..383ba52 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -3289,7 +3289,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
|
||||
@@ -3291,7 +3291,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
|
||||
}
|
||||
|
||||
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1);
|
||||
@@ -773,7 +773,7 @@ index e696af1..bf21d2e 100644
|
||||
return NULL;
|
||||
|
||||
Py_RETURN_NONE;
|
||||
@@ -3320,7 +3320,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
|
||||
@@ -3322,7 +3322,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
|
||||
}
|
||||
|
||||
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 0);
|
||||
@@ -786,17 +786,17 @@ index e696af1..bf21d2e 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From d98c10e4b4e1695975b6c0885b16fbd6ce41cb4b Mon Sep 17 00:00:00 2001
|
||||
From ea618daa66006c1b7f4930a8d3c1139b96fad25e 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 f92e2ae..e5b6042 100644
|
||||
index 62b81a1..c03eccb 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -3087,11 +3087,14 @@ static PyObject *
|
||||
@@ -3079,11 +3079,14 @@ static PyObject *
|
||||
os_ttyname_impl(PyObject *module, int fd)
|
||||
/*[clinic end generated code: output=c424d2e9d1cd636a input=9ff5a58b08115c55]*/
|
||||
{
|
||||
@@ -816,7 +816,7 @@ index f92e2ae..e5b6042 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From 9f19bdef3abf6f804dc5190a0985544ac99cf644 Mon Sep 17 00:00:00 2001
|
||||
From 349971e923507132460ee7b13a8251c2116e4de2 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.
|
||||
@@ -827,7 +827,7 @@ 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
|
||||
index 8dae85a..b391a29 100644
|
||||
--- a/Lib/test/test_io.py
|
||||
+++ b/Lib/test/test_io.py
|
||||
@@ -601,7 +601,7 @@ class IOTest(unittest.TestCase):
|
||||
@@ -869,7 +869,7 @@ index 8f34c18..999063f 100644
|
||||
2.37.3
|
||||
|
||||
|
||||
From eec638e5025983d7888693d30f818535d40ecd1f Mon Sep 17 00:00:00 2001
|
||||
From 3cc5352c5a75cb321d73dfd4c07225a704707cc5 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 7 Mar 2023 18:29:29 +0100
|
||||
Subject: default schemes for Haiku
|
||||
@@ -955,3 +955,32 @@ index 4f92119..919d883 100644
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 4e354c56ade406a1ed301399c5ba0ecaf1fdcff8 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Fri, 10 Mar 2023 20:15:14 -0300
|
||||
Subject: syncronize both _getuserbase() copies on site.py and sysconfig.py.
|
||||
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index 919d883..c306d43 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -109,6 +109,14 @@ def _getuserbase():
|
||||
return joinuser("~", "Library", sys._framework,
|
||||
f"{sys.version_info[0]}.{sys.version_info[1]}")
|
||||
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ try:
|
||||
+ import subprocess
|
||||
+ return subprocess.run(['finddir', 'B_USER_NONPACKAGED_DIRECTORY'],
|
||||
+ stdout=subprocess.PIPE, check=True).stdout.rstrip().decode('utf-8')
|
||||
+ except:
|
||||
+ pass
|
||||
+
|
||||
return joinuser("~", ".local")
|
||||
|
||||
_HAS_USER_BASE = (_getuserbase() is not None)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -9,9 +9,9 @@ OSI-approved open source license."
|
||||
HOMEPAGE="https://www.python.org"
|
||||
LICENSE="Python"
|
||||
COPYRIGHT="1990-2022 Python Software Foundation"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="6a30ecde59c47048013eb5a658c9b5dec277203d2793667f578df7671f7f03f3"
|
||||
CHECKSUM_SHA256="0419e9085bf51b7a672009b3f50dbf1859acdf18ba725d0ec19aa5c8503f0ea3"
|
||||
SOURCE_DIR="Python-$portVersion"
|
||||
PATCHES="python3.10-$portVersion.patchset"
|
||||
if [ "$secondaryArchSuffix" = _x86 ] ; then
|
||||
Reference in New Issue
Block a user