diff --git a/archivers/Makefile b/archivers/Makefile index def6c8192efd..72f206ed39ca 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -212,6 +212,7 @@ SUBDIR += py-python-rpm-packaging SUBDIR += py-python-snappy SUBDIR += py-pyunpack + SUBDIR += py-pyzstd SUBDIR += py-rarfile SUBDIR += py-rcssmin SUBDIR += py-rjsmin diff --git a/archivers/py-pyzstd/Makefile b/archivers/py-pyzstd/Makefile new file mode 100644 index 000000000000..20792ebfa5fc --- /dev/null +++ b/archivers/py-pyzstd/Makefile @@ -0,0 +1,29 @@ +PORTNAME= pyzstd +PORTVERSION= 0.16.2 +CATEGORIES= archivers python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= matthew@wener.org +COMMENT= Python bindings to Zstandard (zstd) compression library +WWW= https://github.com/Rogdham/pyzstd + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist pep517 pytest + +TEST_ENV= ${MAKE_ENV} \ + PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pyzstd/c/_zstd.cpython-311.so + +do-test: + @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v + +.include diff --git a/archivers/py-pyzstd/distinfo b/archivers/py-pyzstd/distinfo new file mode 100644 index 000000000000..56c96ea2000a --- /dev/null +++ b/archivers/py-pyzstd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1724809518 +SHA256 (pyzstd-0.16.2.tar.gz) = 179c1a2ea1565abf09c5f2fd72f9ce7c54b2764cf7369e05c0bfd8f1f67f63d2 +SIZE (pyzstd-0.16.2.tar.gz) = 789505 diff --git a/archivers/py-pyzstd/files/patch-pyproject.toml b/archivers/py-pyzstd/files/patch-pyproject.toml new file mode 100644 index 000000000000..45c1f872d55f --- /dev/null +++ b/archivers/py-pyzstd/files/patch-pyproject.toml @@ -0,0 +1,10 @@ +--- pyproject.toml.orig 2024-11-21 04:16:04 UTC ++++ pyproject.toml +@@ -1,6 +1,6 @@ + [build-system] + # setuptools 64+ support --build-option + # setuptools 74+ drops distutils.msvc9compiler required for Python 3.9 under Windows +-requires = ["setuptools>=64,<74"] ++requires = ["setuptools"] + backend-path = ["build_script"] + build-backend = "pyzstd_pep517" diff --git a/archivers/py-pyzstd/pkg-descr b/archivers/py-pyzstd/pkg-descr new file mode 100644 index 000000000000..180da2d48c4a --- /dev/null +++ b/archivers/py-pyzstd/pkg-descr @@ -0,0 +1,3 @@ +Pyzstd module provides classes and functions for compressing +and decompressing data, using Facebook's Zstandard (or zstd +as short name) algorithm.