Klemens Nanni wrote (2025-01-19 14:29 CET): > On 19.01.2025 14:50, Stefan Hagen wrote: > > The test target didn't work in this port. Upstream has tests and has > > them included in the release tarball, but they don't package the script > > that runs the tests. > > > > For now, I added the run-script to FILESDIR and asked upstream > > to include it into the release in future. So, hopefully this file can > > be removed again at some point. > > Why not fetch the file?
One of many ways... It's basically a python loop over a bunch of files. Unlikely to change or break. So I would keep it as a version independent file, until upstream includes it. I could also fetch it... that would need something like this: SITES.t = https://raw.githubusercontent.com/mikf/gallery-dl/refs/tags/v${MODPY_DISTV}/scripts/ DISTFILES.t = gallery_dl-${MODPY_DISTV}_run_tests{run_tests}.py EXTRACT_ONLY = ${DISTFILES} It looked unnecessarily complicated for the little benefit it provides. I also have a diff that runs the tests without any extra file. The only downside is, that there's no summary. That would be my second preferred option. (diff below) > > I also added more optional dependencies that we have in ports to the > > README file. The only missing one is mkvtoolnix (for mkvmerge), which is > > currently broken. > > That part reads OK to me. > Index: www/gallery-dl/Makefile =================================================================== RCS file: /cvs/ports/www/gallery-dl/Makefile,v diff -u -p -r1.12 Makefile --- www/gallery-dl/Makefile 19 Jan 2025 07:25:32 -0000 1.12 +++ www/gallery-dl/Makefile 19 Jan 2025 15:13:58 -0000 @@ -4,6 +4,8 @@ MODPY_DISTV = 1.28.4 DISTNAME = gallery_dl-${MODPY_DISTV} PKGNAME = ${DISTNAME:S/_/-/} CATEGORIES = www +REVISION = 0 + HOMEPAGE = https://github.com/mikf/gallery-dl/ MAINTAINER = Stefan Hagen <sh+po...@codevoid.de> @@ -18,5 +20,12 @@ MODPY_PYBUILD = setuptools RUN_DEPENDS = www/py-requests TEST_DEPENDS = devel/py-test + +do-test: + rm -f ${WRKSRC}/test/test_results.py + cd ${WRKSRC} && \ + for t in test/test_*.py; \ + do python${MODPY_VERSION} $${t}; \ + done .include <bsd.port.mk> Index: www/gallery-dl/pkg/README =================================================================== RCS file: /cvs/ports/www/gallery-dl/pkg/README,v diff -u -p -r1.1.1.1 README --- www/gallery-dl/pkg/README 12 Nov 2023 11:19:39 -0000 1.1.1.1 +++ www/gallery-dl/pkg/README 19 Jan 2025 15:13:58 -0000 @@ -8,10 +8,11 @@ All supported websites can be listed wit Some features are only available after installing an optional dependency: -ffmpeg - Pixiv Ugoira conversion -py3-socks - SOCKS proxy support -py3-brotli - Brotli compression support -py3-yaml - YAML configuration file support -py3-toml - TOML configuration file support for Python<3.11 -py3-secretstorage - Keyring passwords (--cookies-from-browser) - +ffmpeg - Pixiv Ugoira conversion +py3-brotli - Brotli compression support +py3-secretstorage - Keyring passwords (--cookies-from-browser) +py3-socks - SOCKS proxy support +py3-toml - TOML configuration file support for Python<3.11 +py3-yaml - YAML configuration file support +py3-zstandard - Zstandard compression support +yt-dlp or youtube-dl - HLS/DASH video downloads, ytdl integration