aboutsummaryrefslogtreecommitdiff
path: root/python/python3-pyinotify/python3-pyinotify.SlackBuild
diff options
context:
space:
mode:
authorIsaac Yu <isaacyu@protonmail.com>2025-09-18 19:49:29 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2025-09-19 10:58:34 +0700
commitb50c0d94051cc41ccd04d9342d07fbe47ac949dd (patch)
tree646009869d429543eb96ad44fdf339c2c2e95438 /python/python3-pyinotify/python3-pyinotify.SlackBuild
parented17a06df22ddfb9939b1b8c2d4cab191f2b7c90 (diff)
python/python3-pyinotify: If using Slackware current, make asyncore support optional
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-pyinotify/python3-pyinotify.SlackBuild')
-rw-r--r--python/python3-pyinotify/python3-pyinotify.SlackBuild11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/python3-pyinotify/python3-pyinotify.SlackBuild b/python/python3-pyinotify/python3-pyinotify.SlackBuild
index 9c96d52a7b..20533c6b6e 100644
--- a/python/python3-pyinotify/python3-pyinotify.SlackBuild
+++ b/python/python3-pyinotify/python3-pyinotify.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for python3-pyinotify
# Copyright 2012-2015 Larry Hajali <larryhaja[at]gmail[dot]com>
-# Copyright 2024 Isaac Yu <isaacyu@protonmail.com>
+# Copyright 2024-2025 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -68,6 +68,15 @@ find -L . \
# Compile the C extension.
sed -i '/^compile_ext_mod/s|=.*|= True|' setup.py
+# Make asyncore support optional for Python 3.
+# This patch is for Slackware current.
+# See https://github.com/seb-m/pyinotify/issues/204 for more details
+PYVER_MAJOR=$(python3 -c 'import sys; print("%d" % sys.version_info.major)')
+PYVER_MINOR=$(python3 -c 'import sys; print("%d" % sys.version_info.minor)')
+if [[ $PYVER_MAJOR == 3 ]] && [[ $PYVER_MINOR -ge 12 ]]; then
+ patch -p1 < $CWD/pyinotify-python-3.12-fix.patch
+fi
+
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \