Skip to content

Commit c504eda

Browse files
committed
fix(main/python): fix import _multiprocessing
- Fixes #28777 - #28768 , but for `import _multiprocessing` - Restores pre-3.13 behavior of `python -c "import _multiprocessing"` - Termux has implementation of `sem_open()` in `libandroid-posix-semaphore` https://github.com/termux/termux-packages/blob/a68c38153da3cc6b338e1193f6b145ed65b5d1c1/packages/libandroid-posix-semaphore/semaphore.c#L89
1 parent 4f8b75e commit c504eda

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

packages/python/0005-impl-multiprocessing.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
sem_open() and sem_unlink() are implemented in Termux by libandroid-posix-semaphore
2+
https://github.com/termux/termux-packages/issues/28777
3+
4+
--- a/configure.ac
5+
+++ b/configure.ac
6+
@@ -5197,10 +5197,6 @@ if test "$ac_sys_system" = "Linux-android"; then
7+
blocked_funcs="chroot initgroups setegid seteuid setgid sethostname
8+
setregid setresgid setresuid setreuid setuid"
9+
10+
- # These functions are unimplemented and always return an error
11+
- # (https://android.googlesource.com/platform/system/sepolicy/+/refs/heads/android13-release/public/domain.te#1044)
12+
- blocked_funcs="$blocked_funcs sem_open sem_unlink"
13+
-
14+
# Before API level 23, when fchmodat is called with the unimplemented flag
15+
# AT_SYMLINK_NOFOLLOW, instead of returning ENOTSUP as it should, it actually
16+
# follows the symlink.
117
--- a/Lib/multiprocessing/heap.py
218
+++ b/Lib/multiprocessing/heap.py
319
@@ -70,7 +70,7 @@

packages/python/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TERMUX_PKG_LICENSE="custom"
55
TERMUX_PKG_LICENSE_FILE="LICENSE"
66
TERMUX_PKG_MAINTAINER="Yaksh Bariya <thunder-coding@termux.dev>"
77
TERMUX_PKG_VERSION="3.13.12"
8-
TERMUX_PKG_REVISION=1
8+
TERMUX_PKG_REVISION=2
99
_DEBPYTHON_COMMIT=f358ab52bf2932ad55b1a72a29c9762169e6ac47
1010
TERMUX_PKG_SRCURL=(
1111
https://www.python.org/ftp/python/${TERMUX_PKG_VERSION}/Python-${TERMUX_PKG_VERSION}.tar.xz

0 commit comments

Comments
 (0)