aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2024-02-19 17:32:48 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2024-02-19 19:10:25 +0000
commitab060a910e251cfbc4a7f709e26e8852a8bd4bde (patch)
tree62d150568e0af9cfd945243cb83b1dd656974b5b
parentaf6625fe84bbf4377ac3000f43d06ddcc9ba599b (diff)
downloadports-ab060a910e251cfbc4a7f709e26e8852a8bd4bde.tar.gz
ports-ab060a910e251cfbc4a7f709e26e8852a8bd4bde.zip
devel/py-inotify-simple: Bugfix
-rw-r--r--devel/py-inotify-simple/Makefile1
-rw-r--r--devel/py-inotify-simple/files/patch-inotify__simple.py21
2 files changed, 20 insertions, 2 deletions
diff --git a/devel/py-inotify-simple/Makefile b/devel/py-inotify-simple/Makefile
index 8b558c4fd177..012aadf736b6 100644
--- a/devel/py-inotify-simple/Makefile
+++ b/devel/py-inotify-simple/Makefile
@@ -1,5 +1,6 @@
PORTNAME= inotify-simple
PORTVERSION= 1.3.5
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/devel/py-inotify-simple/files/patch-inotify__simple.py b/devel/py-inotify-simple/files/patch-inotify__simple.py
index 6f4492d46d69..346f1722618b 100644
--- a/devel/py-inotify-simple/files/patch-inotify__simple.py
+++ b/devel/py-inotify-simple/files/patch-inotify__simple.py
@@ -1,6 +1,14 @@
---- inotify_simple.py.orig 2024-02-11 00:28:11 UTC
+--- inotify_simple.py.orig 2020-08-06 00:20:49 UTC
+++ inotify_simple.py
-@@ -82,7 +82,7 @@ class INotify(FileIO):
+@@ -4,6 +4,7 @@ from enum import Enum, IntEnum
+ from collections import namedtuple
+ from struct import unpack_from, calcsize
+ from select import poll
++from select import POLLIN
+ from time import sleep
+ from ctypes import CDLL, get_errno, c_int
+ from ctypes.util import find_library
+@@ -82,7 +83,7 @@ class INotify(FileIO):
manually with ``os.read(fd)``) to raise ``BlockingIOError`` if no data
is available."""
try:
@@ -9,3 +17,12 @@
except RuntimeError: # Python on Synology NASs raises a RuntimeError
libc_so = None
global _libc; _libc = _libc or CDLL(libc_so or 'libc.so.6', use_errno=True)
+@@ -90,7 +91,7 @@ class INotify(FileIO):
+ flags = (not inheritable) * O_CLOEXEC | bool(nonblocking) * os.O_NONBLOCK
+ FileIO.__init__(self, _libc_call(_libc.inotify_init1, flags), mode='rb')
+ self._poller = poll()
+- self._poller.register(self.fileno())
++ self._poller.register(self.fileno(), POLLIN)
+
+ def add_watch(self, path, mask):
+ """Wrapper around ``inotify_add_watch()``. Returns the watch