[packages/python-pyinotify] backport distutils removal from setup.py (upstream PR #209); rel 15
arekm
arekm at pld-linux.org
Tue Jul 21 14:39:15 CEST 2026
commit 5e077778f1342af09ae0d66695b580e03d84d51c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Jul 21 14:38:35 2026 +0200
backport distutils removal from setup.py (upstream PR #209); rel 15
distutils.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
python-pyinotify.spec | 4 +++-
2 files changed, 46 insertions(+), 1 deletion(-)
---
diff --git a/python-pyinotify.spec b/python-pyinotify.spec
index 86d0e82..21e929e 100644
--- a/python-pyinotify.spec
+++ b/python-pyinotify.spec
@@ -4,12 +4,13 @@ Summary(hu.UTF-8): Pyinotify egy egyszerű Python modul, amellyel a fájlrendsze
Summary(pl.UTF-8): Pyinotify - moduł w czystym Pythonie do monitorowania zmian w systemie plików
Name: python-%{module}
Version: 0.9.6
-Release: 14
+Release: 15
License: MIT
Group: Development/Languages/Python
Source0: http://seb.dbzteam.org/pub/pyinotify/releases/%{module}-%{version}.tar.gz
# Source0-md5: 8e580fa1ff3971f94a6f81672b76c406
Patch0: asyncore.patch
+Patch1: distutils.patch
URL: https://github.com/seb-m/pyinotify
BuildRequires: python-devel
BuildRequires: python-setuptools
@@ -55,6 +56,7 @@ systemie plików.
%setup -q -n %{module}-%{version}
%patch -P0 -p1
+%patch -P1 -p1
%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' \
python2/examples/autocompile.py
diff --git a/distutils.patch b/distutils.patch
new file mode 100644
index 0000000..b77debb
--- /dev/null
+++ b/distutils.patch
@@ -0,0 +1,43 @@
+From e430a4f2d78e91d430ef4c1266312b96186fcd3f Mon Sep 17 00:00:00 2001
+From: fazalpsinfo-cmyk <fazalpsinfo at gmail.com>
+Date: Sun, 19 Jul 2026 16:25:55 +0530
+Subject: [PATCH] Fix deprecated distutils imports (replaced with
+ setuptools/sysconfig)
+
+---
+ setup.py | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 15d68ab..2f0c015 100755
+--- a/setup.py
++++ b/setup.py
+@@ -8,14 +8,12 @@
+ # import statements
+ import os
+ import sys
+-import distutils.extension
+-from distutils.util import get_platform
++from setuptools import Extension
+ try:
+- # First try to load most advanced setuptools setup.
+- from setuptools import setup
+-except:
+- # Fall back if setuptools is not installed.
+- from distutils.core import setup
++ from sysconfig import get_platform
++except ImportError:
++ from distutils.util import get_platform
++from setuptools import setup
+
+ platform = get_platform()
+
+@@ -97,7 +95,7 @@ def should_compile_ext_mod():
+ # sources for ext module
+ ext_mod_src = ['common/inotify_syscalls.c']
+ # dst for ext module
+- ext_mod.append(distutils.extension.Extension('inotify_syscalls',
++ ext_mod.append(Extension('inotify_syscalls',
+ ext_mod_src))
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pyinotify.git/commitdiff/5e077778f1342af09ae0d66695b580e03d84d51c
More information about the pld-cvs-commit
mailing list