git: 30dd3d5abda0 - main - archivers/py-blosc2: Add py-blosc2 2.2.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 18:08:07 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=30dd3d5abda0a5df19c9787b783f8ea0538f124f commit 30dd3d5abda0a5df19c9787b783f8ea0538f124f Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-04-18 17:51:32 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-04-18 18:00:40 +0000 archivers/py-blosc2: Add py-blosc2 2.2.0 C-Blosc2 is the new major version of C-Blosc, and is backward compatible with both the C-Blosc1 API and its in-memory format. Python-Blosc2 is a Python package that wraps C-Blosc2, the newest version of the Blosc compressor. Currently Python-Blosc2 already reproduces the API of Python-Blosc, so it can be used as a drop-in replacement. However, there are a few exceptions for a full compatibility. In addition, Python-Blosc2 aims to leverage the new C-Blosc2 API so as to support super-chunks, multi-dimensional arrays (NDArray), serialization and other bells and whistles introduced in C-Blosc2. Although this is always and endless process, we have already catch up with most of the C-Blosc2 API capabilities. Note: Python-Blosc2 is meant to be backward compatible with Python-Blosc data. That means that it can read data generated with Python-Blosc, but the opposite is not true (i.e. there is no forward compatibility). --- archivers/Makefile | 1 + archivers/py-blosc2/Makefile | 41 ++++++++++++++++++++++++++ archivers/py-blosc2/distinfo | 3 ++ archivers/py-blosc2/files/patch-pyproject.toml | 9 ++++++ archivers/py-blosc2/pkg-descr | 17 +++++++++++ 5 files changed, 71 insertions(+) diff --git a/archivers/Makefile b/archivers/Makefile index 624b2b7128ae..5bfce871b36c 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -177,6 +177,7 @@ SUBDIR += ppunpack SUBDIR += pxz SUBDIR += py-acefile + SUBDIR += py-blosc2 SUBDIR += py-borgbackup SUBDIR += py-borgbackup11 SUBDIR += py-brotli diff --git a/archivers/py-blosc2/Makefile b/archivers/py-blosc2/Makefile new file mode 100644 index 000000000000..8b933417ea54 --- /dev/null +++ b/archivers/py-blosc2/Makefile @@ -0,0 +1,41 @@ +PORTNAME= blosc2 +PORTVERSION= 2.2.0 +CATEGORIES= archivers python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Python wrapper for the C-Blosc2 library +WWW= https://github.com/Blosc/python-blosc2 + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= cmake:devel/cmake-core \ + ninja:devel/ninja \ + ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} +LIB_DEPENDS= libblosc2.so:archivers/c-blosc2 +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack>=0:devel/py-msgpack@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ndindex>=1.4:math/py-ndindex@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}numpy>=1.20.3,1:math/py-numpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}py-cpuinfo>=0:sysutils/py-py-cpuinfo@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rich>=0:textproc/py-rich@${PY_FLAVOR} + +USES= pkgconfig python:3.8+ +USE_PYTHON= autoplist concurrent cython pep517 + +MAKE_ENV= CMAKE_ARGS=-DUSE_SYSTEM_BLOSC2=ON + +post-extract: + @${RM} ${WRKSRC}/blosc2/c-blosc2/blosc/shuffle-avx2.c.orig + +post-patch: +# Clean up bundled libraries + @${RM} -r ${WRKSRC}/blosc2/c-blosc2/ + +post-install: + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + + +.include <bsd.port.mk> diff --git a/archivers/py-blosc2/distinfo b/archivers/py-blosc2/distinfo new file mode 100644 index 000000000000..09a27244985f --- /dev/null +++ b/archivers/py-blosc2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1681052880 +SHA256 (blosc2-2.2.0.tar.gz) = 4cf3893fe85da4bd899ecf7a457fd09b2212fad256182100108de7a92b88aa87 +SIZE (blosc2-2.2.0.tar.gz) = 4135248 diff --git a/archivers/py-blosc2/files/patch-pyproject.toml b/archivers/py-blosc2/files/patch-pyproject.toml new file mode 100644 index 000000000000..0493f71cbd28 --- /dev/null +++ b/archivers/py-blosc2/files/patch-pyproject.toml @@ -0,0 +1,9 @@ +--- pyproject.toml.orig 2023-04-04 10:26:30 UTC ++++ pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools", "scikit-build", "cython", "cmake", "ninja", "oldest-supported-numpy"] ++requires = ["setuptools", "scikit-build", "cython", "numpy"] + + [tool.cibuildwheel] + skip = "cp36-* cp37-* pp37-* *-manylinux_i686 *_ppc64le *_s390x *-musllinux*" diff --git a/archivers/py-blosc2/pkg-descr b/archivers/py-blosc2/pkg-descr new file mode 100644 index 000000000000..0a8ee49311ca --- /dev/null +++ b/archivers/py-blosc2/pkg-descr @@ -0,0 +1,17 @@ +C-Blosc2 is the new major version of C-Blosc, and is backward compatible with +both the C-Blosc1 API and its in-memory format. Python-Blosc2 is a Python +package that wraps C-Blosc2, the newest version of the Blosc compressor. + +Currently Python-Blosc2 already reproduces the API of Python-Blosc, so it can be +used as a drop-in replacement. However, there are a few exceptions for a full +compatibility. + +In addition, Python-Blosc2 aims to leverage the new C-Blosc2 API so as to +support super-chunks, multi-dimensional arrays (NDArray), serialization and +other bells and whistles introduced in C-Blosc2. Although this is always and +endless process, we have already catch up with most of the C-Blosc2 API +capabilities. + +Note: Python-Blosc2 is meant to be backward compatible with Python-Blosc data. +That means that it can read data generated with Python-Blosc, but the opposite +is not true (i.e. there is no forward compatibility).