--- b/devel/py-watchdog/Makefile +++ b/devel/py-watchdog/Makefile @@ -1,5 +1,5 @@ PORTNAME= watchdog -PORTVERSION= 0.10.6 +PORTVERSION= 2.1.5 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -9,12 +9,10 @@ COMMENT= Python API library to monitor file system events LICENSE= APACHE20 -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argh>=0.26.1:devel/py-argh@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}eventlet>=0:net/py-eventlet@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pathtools>=0.1.2:devel/py-pathtools@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argh>=0.24.1:devel/py-argh@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>=3.10:devel/py-yaml@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}flaky>0:devel/py-flaky@${PY_FLAVOR} USES= python:3.6+ USE_PYTHON= autoplist concurrent distutils @@ -25,10 +23,11 @@ NO_ARCH= yes PORTDOCS= * +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + OPTIONS_DEFINE= DOCS -DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pathtools>=0.1.2:devel/py-pathtools@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} +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) @@ -39,6 +38,6 @@ post-install-DOCS-on: ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "-not -name .buildinfo") do-test: - @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= tests + @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= tests .include --- b/devel/py-watchdog/distinfo +++ b/devel/py-watchdog/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1612010670 -SHA256 (watchdog-0.10.6.tar.gz) = 1e1ea6d3d74feca5c62393525107aa45c5d4cd15199e2a5f62b1a6ca83679131 -SIZE (watchdog-0.10.6.tar.gz) = 99949 +TIMESTAMP = 1631895216 +SHA256 (watchdog-2.1.5.tar.gz) = 5563b005907613430ef3d4aaac9c78600dd5704e84764cb6deda4b3d72807f09 +SIZE (watchdog-2.1.5.tar.gz) = 114220 --- /dev/null +++ b/devel/py-watchdog/files/patch-src_watchdog_observers_kqueue.py @@ -0,0 +1,25 @@ +Restore original return value of "absolute_path" as is was done by "pathtools". + +Obtained from: +https://github.com/gorakhargosh/watchdog/commit/b9774e9e6e8dcbb7d2e0786eb13ab30848ed1514 + +--- src/watchdog/observers/kqueue.py.orig 2021-09-18 09:02:58 UTC ++++ src/watchdog/observers/kqueue.py +@@ -76,8 +76,6 @@ import os + import os.path + import select + +-from pathlib import Path +- + from watchdog.observers.api import ( + BaseObserver, + EventEmitter, +@@ -127,7 +125,7 @@ WATCHDOG_KQ_FFLAGS = ( + + + def absolute_path(path): +- return Path(path).resolve() ++ return os.path.abspath(os.path.normpath(path)) + + # Flag tests. + --- /dev/null +++ b/devel/py-watchdog/files/patch-tests_test__emitter.py @@ -0,0 +1,26 @@ +Skip some checks for BSD + +* Test "test_delete_self()" was tested only on Darwin platforms in 0.10.6 +* Test "file_lifecyle" was introduced in 2.0.0 + +Obtained from: +https://github.com/gorakhargosh/watchdog/commit/b9774e9e6e8dcbb7d2e0786eb13ab30848ed1514 + +--- tests/test_emitter.py.orig 2021-09-18 09:50:34 UTC ++++ tests/test_emitter.py +@@ -355,6 +355,7 @@ def test_separate_consecutive_moves(): + + + @pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter) ++@pytest.mark.skipif(platform.is_bsd(), reason="BSD create another set of events for this test") + def test_delete_self(): + mkdir(p('dir1')) + start_watching(p('dir1')) +@@ -642,6 +643,7 @@ def test_move_nested_subdirectories_on_windows(): + + + @pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter) ++@pytest.mark.skipif(platform.is_bsd(), reason="BSD create another set of events for this test") + def test_file_lifecyle(): + start_watching() +