Tuesday, September 03, 2024

Re: archivers/py-zstandard: improve tests

On 2024/09/03 00:11, Kirill A. Korinsky wrote:
> ports@,
>
> Here a small follow up changes for archivers/py-zstandard after discussion
> about net/synapse at this thread: https://marc.info/?t=171802795000004&r=1&w=2
> where cleaner way was found by Landry.
>
> So, here the diff to avoid copy of tests.
>
> Index: archivers/py-zstandard/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/py-zstandard/Makefile,v
> retrieving revision 1.2
> diff -u -p -r1.2 Makefile
> --- archivers/py-zstandard/Makefile 28 Aug 2024 11:49:24 -0000 1.2
> +++ archivers/py-zstandard/Makefile 2 Sep 2024 22:05:02 -0000
> @@ -17,11 +17,9 @@ BUILD_DEPENDS = devel/py-cffi${MODPY_FL
> FLAVORS = python3
> FLAVOR = python3
>
> -MODPY_PYTEST_ARGS = tests/
> -MODPY_TEST_DIR = ${WRKDIR}
> -
> pre-test:
> - @rm -rf ${WRKDIR}/tests
> - @cp -r ${WRKSRC}/tests ${WRKDIR}/
> + find ${WRKSRC}/build/lib.openbsd-${OSREV}-${ARCH}-cpython-${MODPY_MAJORMINOR}/zstandard \
> + -name '*.so' -type f \
> + -exec ln -s {} ${WRKSRC}/zstandard \;

If you can find a way, it would be much better if this could be handled
in python.port.mk than individual ports, it should be the same for any
ports using a certain MODPY_PYBUILD type (at least those that have .so
extensions).

It feels like there should be a way to set PYTHONPATH etc to avoid the
mess of copying/linking but I didn't hit upon it yet...

No comments:

Post a Comment