mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 21:30:08 +02:00
python3.7: don't reinit locks on fork
same as for 3.8. fix hang issue on "meson test"
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a4cd9d290a0fe86b16dbd55dc5de35390ba2bd0d Mon Sep 17 00:00:00 2001
|
||||
From 5a86655aff86a8588797bd27eedf31bdfe8807c7 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
|
||||
@@ -86,10 +86,10 @@ index 0258d3d..aaec6e6 100644
|
||||
def finalize_other(self):
|
||||
"""Finalizes options for non-posix platforms"""
|
||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index 83160f8..7e9fec5 100644
|
||||
index 0a034ee..db37eeb 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -107,7 +107,8 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||
@@ -112,7 +112,8 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||
incdir = os.path.join(get_config_var('srcdir'), 'Include')
|
||||
return os.path.normpath(incdir)
|
||||
python_dir = 'python' + get_python_version() + build_flags
|
||||
@@ -99,7 +99,7 @@ index 83160f8..7e9fec5 100644
|
||||
elif os.name == "nt":
|
||||
if python_build:
|
||||
# Include both the include and PC dir to ensure we can find
|
||||
@@ -142,12 +143,20 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||
@@ -147,12 +148,20 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||
|
||||
if os.name == "posix":
|
||||
@@ -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 ad11463..e39080e 100644
|
||||
index 8786588..ffd717f 100644
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -258,6 +258,14 @@ def _getuserbase():
|
||||
@@ -202,10 +202,10 @@ index 57a0265..ea316a7 100644
|
||||
# Somehow /dev/tty appears seekable on some BSDs
|
||||
self.assertEqual(f.seekable(), False)
|
||||
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
|
||||
index 11180b7..d99f73e 100644
|
||||
index 1cd9e56..893cf1f 100644
|
||||
--- a/Lib/test/test_posix.py
|
||||
+++ b/Lib/test/test_posix.py
|
||||
@@ -1164,7 +1164,7 @@ class PosixTester(unittest.TestCase):
|
||||
@@ -1174,7 +1174,7 @@ class PosixTester(unittest.TestCase):
|
||||
posix.close(f)
|
||||
support.rmtree(support.TESTFN + 'dir')
|
||||
|
||||
@@ -215,10 +215,10 @@ index 11180b7..d99f73e 100644
|
||||
def test_mknod_dir_fd(self):
|
||||
# Test using mknodat() to create a FIFO (the only use specified
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 2d2e11f..b1848a2 100644
|
||||
index beaccf5..8cbdddb 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -141,7 +141,7 @@ BINDIR= @bindir@
|
||||
@@ -143,7 +143,7 @@ BINDIR= @bindir@
|
||||
LIBDIR= @libdir@
|
||||
MANDIR= @mandir@
|
||||
INCLUDEDIR= @includedir@
|
||||
@@ -327,10 +327,10 @@ index e59280f..f1aaef9 100644
|
||||
#endif
|
||||
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
index 988471e..d1f3bcf 100644
|
||||
index a9ef7e2..3173b3b 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -7142,7 +7142,9 @@ PyInit__socket(void)
|
||||
@@ -7153,7 +7153,9 @@ PyInit__socket(void)
|
||||
/* SOCK_RAW is marked as optional in the POSIX specification */
|
||||
PyModule_AddIntMacro(m, SOCK_RAW);
|
||||
#endif
|
||||
@@ -381,7 +381,7 @@ index 1601ec0..4c98fe8 100644
|
||||
else
|
||||
PyErr_SetString(PyExc_KeyError, "getspnam(): name not found");
|
||||
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
|
||||
index 6306c3a..847becf 100644
|
||||
index 12def95..6521bd6 100644
|
||||
--- a/Python/bltinmodule.c
|
||||
+++ b/Python/bltinmodule.c
|
||||
@@ -17,7 +17,7 @@
|
||||
@@ -419,7 +419,7 @@ index 4363c0c..40994b0 100755
|
||||
def main():
|
||||
global filedict
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ad0f4d4..80d2649 100644
|
||||
index 1ef0df7..a0d60f1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1151,6 +1151,16 @@ if test $enable_shared = "yes"; then
|
||||
@@ -487,7 +487,7 @@ index ad0f4d4..80d2649 100644
|
||||
AC_MSG_CHECKING(for --with-libs)
|
||||
AC_ARG_WITH(libs,
|
||||
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
|
||||
@@ -4293,6 +4310,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
@@ -4296,6 +4313,7 @@ AC_CHECK_FUNC(__fpu_control,
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
@@ -496,10 +496,10 @@ index ad0f4d4..80d2649 100644
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b4357e3..df227d1 100644
|
||||
index 88cff61..7e0dc0a 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -625,6 +625,11 @@ class PyBuildExt(build_ext):
|
||||
@@ -664,6 +664,11 @@ class PyBuildExt(build_ext):
|
||||
|
||||
srcdir = sysconfig.get_config_var('srcdir')
|
||||
|
||||
@@ -511,7 +511,7 @@ index b4357e3..df227d1 100644
|
||||
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
||||
if host_platform in ['osf1', 'unixware7', 'openunix8']:
|
||||
lib_dirs += ['/usr/ccs/lib']
|
||||
@@ -667,12 +672,12 @@ class PyBuildExt(build_ext):
|
||||
@@ -706,12 +711,12 @@ class PyBuildExt(build_ext):
|
||||
exts.append( Extension('cmath', ['cmathmodule.c'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
@@ -526,7 +526,7 @@ index b4357e3..df227d1 100644
|
||||
|
||||
# time libraries: librt may be needed for clock_gettime()
|
||||
time_libs = []
|
||||
@@ -686,7 +691,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -725,7 +730,7 @@ class PyBuildExt(build_ext):
|
||||
# libm is needed by delta_new() that uses round() and by accum() that
|
||||
# uses modf().
|
||||
exts.append( Extension('_datetime', ['_datetimemodule.c'],
|
||||
@@ -535,7 +535,7 @@ index b4357e3..df227d1 100644
|
||||
# random number generator implemented in C
|
||||
exts.append( Extension("_random", ["_randommodule.c"]) )
|
||||
# bisect
|
||||
@@ -777,7 +782,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -816,7 +821,7 @@ class PyBuildExt(build_ext):
|
||||
#
|
||||
# audioop needs libm for floor() in multiple functions.
|
||||
exts.append( Extension('audioop', ['audioop.c'],
|
||||
@@ -544,7 +544,7 @@ index b4357e3..df227d1 100644
|
||||
|
||||
# readline
|
||||
do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
|
||||
@@ -1976,7 +1981,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2015,7 +2020,7 @@ class PyBuildExt(build_ext):
|
||||
# function my_sqrt() needs libm for sqrt()
|
||||
ext_test = Extension('_ctypes_test',
|
||||
sources=['_ctypes/_ctypes_test.c'],
|
||||
@@ -553,7 +553,7 @@ index b4357e3..df227d1 100644
|
||||
self.extensions.extend([ext, ext_test])
|
||||
|
||||
if host_platform == 'darwin':
|
||||
@@ -2024,7 +2029,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2063,7 +2068,7 @@ class PyBuildExt(build_ext):
|
||||
'Modules',
|
||||
'_decimal',
|
||||
'libmpdec'))]
|
||||
@@ -562,7 +562,7 @@ index b4357e3..df227d1 100644
|
||||
sources = [
|
||||
'_decimal/_decimal.c',
|
||||
'_decimal/libmpdec/basearith.c',
|
||||
@@ -2187,7 +2192,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2226,7 +2231,7 @@ class PyBuildExt(build_ext):
|
||||
return ssl_ext, hashlib_ext
|
||||
|
||||
def _detect_nis(self, inc_dirs, lib_dirs):
|
||||
@@ -572,20 +572,20 @@ index b4357e3..df227d1 100644
|
||||
|
||||
libs = []
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
||||
From b06b387748b4a4f7dfc989a02ab3e9b0dd5ad4b6 Mon Sep 17 00:00:00 2001
|
||||
From ba498555a6561129cb85af96728e2abb80ac6df9 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 3c1abb7..5e96075 100644
|
||||
index d1b6de5..6333785 100644
|
||||
--- a/Lib/subprocess.py
|
||||
+++ b/Lib/subprocess.py
|
||||
@@ -1508,6 +1508,8 @@ class Popen(object):
|
||||
@@ -1537,6 +1537,8 @@ class Popen(object):
|
||||
SubprocessError)
|
||||
if issubclass(child_exception_type, OSError) and hex_errno:
|
||||
errno_num = int(hex_errno, 16)
|
||||
@@ -610,10 +610,10 @@ index 3cf0683..adf3608 100644
|
||||
*--cur = Py_hexdigits[saved_errno % 16];
|
||||
saved_errno /= 16;
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
||||
From 6bb4b749c391d619d74e9f2c741854878b9527dc Mon Sep 17 00:00:00 2001
|
||||
From 5bd3ff9583dceb24e2af775b59037906fe7756d2 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
|
||||
@@ -694,23 +694,20 @@ index 97973bc..b2e4095 100644
|
||||
print(cdll.LoadLibrary("libm.so"))
|
||||
print(cdll.LoadLibrary("libcrypt.so"))
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
||||
From f55317a2a10d85c3240225d3c22f76e155cbe911 Mon Sep 17 00:00:00 2001
|
||||
From d6665e4df98dab9f724de1190825c14ca58ef84c Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Wolfer <phil@parolu.io>
|
||||
Date: Mon, 23 Sep 2019 09:14:58 +0200
|
||||
Subject: [PATCH] webbrowser: Support for default browsers on Haiku
|
||||
Subject: webbrowser: Support for default browsers on Haiku
|
||||
|
||||
---
|
||||
Lib/webbrowser.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
|
||||
index 0af36c4301..0a39655ab9 100755
|
||||
index 82bff83..e66abd9 100755
|
||||
--- a/Lib/webbrowser.py
|
||||
+++ b/Lib/webbrowser.py
|
||||
@@ -527,6 +527,11 @@ def register_standard_browsers():
|
||||
@@ -522,6 +522,11 @@ def register_standard_browsers():
|
||||
"netscape", "opera", iexplore):
|
||||
if shutil.which(browser):
|
||||
register(browser, None, BackgroundBrowser(browser))
|
||||
@@ -722,6 +719,29 @@ index 0af36c4301..0a39655ab9 100755
|
||||
else:
|
||||
# Prefer X browsers if present
|
||||
if os.environ.get("DISPLAY"):
|
||||
--
|
||||
2.23.0
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 9cc979f3c67832887fcd11595976828d3243d148 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 30 Nov 2019 23:26:57 +0100
|
||||
Subject: don't reinit locks on fork.
|
||||
|
||||
|
||||
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
|
||||
index 6e01714..d84017a 100644
|
||||
--- a/Lib/logging/__init__.py
|
||||
+++ b/Lib/logging/__init__.py
|
||||
@@ -228,7 +228,7 @@ def _releaseLock():
|
||||
|
||||
# Prevent a held logging lock from blocking a child from logging.
|
||||
|
||||
-if not hasattr(os, 'register_at_fork'): # Windows and friends.
|
||||
+if sys.platform.startswith('haiku') or not hasattr(os, 'register_at_fork'): # Windows and friends.
|
||||
def _register_at_fork_reinit_lock(instance):
|
||||
pass # no-op when os.register_at_fork does not exist.
|
||||
else:
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user