git: c8332032ae22 - main - devel/py-watchdog: add a patch to enable inotify
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Nov 2022 14:25:25 UTC
The branch main has been updated by nivit: URL: https://cgit.FreeBSD.org/ports/commit/?id=c8332032ae22e82e5e60bd493ed697f9b8340cb1 commit c8332032ae22e82e5e60bd493ed697f9b8340cb1 Author: Robert Kruus <rob.kruus@gmail.com> AuthorDate: 2022-11-20 14:20:45 +0000 Commit: Nicola Vitale <nivit@FreeBSD.org> CommitDate: 2022-11-20 14:24:35 +0000 devel/py-watchdog: add a patch to enable inotify - The port does not currently work with the inotify observer as the inotify functions are no longer in the base system/libc. The patch adds a lib_depend on devel/libinotify and patches the appropriate file in the port. - Bump PORTREVISION PR: 260939 Reported by: Robert Kruss <rob.kruus@gmail.com> --- devel/py-watchdog/Makefile | 10 ++++++---- .../files/patch-src_watchdog_observers_inotify__c.py | 11 +++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/devel/py-watchdog/Makefile b/devel/py-watchdog/Makefile index 8643ef6384ed..3b6c5f88d013 100644 --- a/devel/py-watchdog/Makefile +++ b/devel/py-watchdog/Makefile @@ -1,5 +1,6 @@ PORTNAME= watchdog DISTVERSION= 2.1.9 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,21 +11,22 @@ WWW= https://github.com/gorakhargosh/watchdog LICENSE= APACHE20 +LIB_DEPENDS= libinotify.so:devel/libinotify RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=3.10:devel/py-yaml@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}flaky>0:devel/py-flaky@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flaky>0:devel/py-flaky@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} USES= python:3.6+ USE_PYTHON= autoplist concurrent distutils +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} NO_ARCH= yes PORTDOCS= * -TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - OPTIONS_DEFINE= DOCS DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} diff --git a/devel/py-watchdog/files/patch-src_watchdog_observers_inotify__c.py b/devel/py-watchdog/files/patch-src_watchdog_observers_inotify__c.py new file mode 100644 index 000000000000..1dd1a1a14808 --- /dev/null +++ b/devel/py-watchdog/files/patch-src_watchdog_observers_inotify__c.py @@ -0,0 +1,11 @@ +--- src/watchdog/observers/inotify_c.py.orig 2022-06-10 10:11:14 UTC ++++ src/watchdog/observers/inotify_c.py +@@ -25,7 +25,7 @@ from functools import reduce + from ctypes import c_int, c_char_p, c_uint32 + from watchdog.utils import UnsupportedLibc + +-libc = ctypes.CDLL(None) ++libc = ctypes.CDLL('libinotify.so') + + if not hasattr(libc, 'inotify_init') or \ + not hasattr(libc, 'inotify_add_watch') or \