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,43 +1,45 @@ PORTNAME= watchdog DISTVERSION= 2.1.9 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= nivit@FreeBSD.org COMMENT= Python API library to monitor file system events 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} post-build-DOCS-on: (cd ${WRKSRC}/docs ; ${MAKE_CMD} SPHINXBUILD=sphinx-build-${PYTHON_VER} html) post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/docs/build/html ; \ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "-not -name .buildinfo") do-test: @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= tests .include 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 \