Skip to content

Commit

Permalink
devel/py-inotify-simple: New port
Browse files Browse the repository at this point in the history
Simple wrapper around inotify
  • Loading branch information
grembo committed Feb 18, 2024
1 parent de1e3c8 commit 70d529b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -4832,6 +4832,7 @@
SUBDIR += py-iniconfig
SUBDIR += py-inifile
SUBDIR += py-iniparse
SUBDIR += py-inotify-simple
SUBDIR += py-installer
SUBDIR += py-intbitset
SUBDIR += py-intelhex
Expand Down
22 changes: 22 additions & 0 deletions devel/py-inotify-simple/Makefile
@@ -0,0 +1,22 @@
PORTNAME= inotify-simple
PORTVERSION= 1.3.5
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}

MAINTAINER= grembo@FreeBSD.org
COMMENT= Simple wrapper around inotify
WWW= https://github.com/chrisjbillington/inotify_simple

LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

LIB_DEPENDS= libinotify.so:devel/libinotify

USES= python
USE_PYTHON= autoplist distutils

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/py-inotify-simple/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1707611159
SHA256 (inotify_simple-1.3.5.tar.gz) = 8440ffe49c4ae81a8df57c1ae1eb4b6bfa7acb830099bfb3e305b383005cc128
SIZE (inotify_simple-1.3.5.tar.gz) = 9747
11 changes: 11 additions & 0 deletions devel/py-inotify-simple/files/patch-inotify__simple.py
@@ -0,0 +1,11 @@
--- inotify_simple.py.orig 2024-02-11 00:28:11 UTC
+++ inotify_simple.py
@@ -82,7 +82,7 @@ class INotify(FileIO):
manually with ``os.read(fd)``) to raise ``BlockingIOError`` if no data
is available."""
try:
- libc_so = find_library('c')
+ libc_so = find_library('inotify')
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)
2 changes: 2 additions & 0 deletions devel/py-inotify-simple/pkg-descr
@@ -0,0 +1,2 @@
inotify_simple is a simple Python wrapper around inotify.
No fancy bells and whistles, just a literal wrapper with ctypes.

0 comments on commit 70d529b

Please sign in to comment.