summaryrefslogtreecommitdiff
path: root/dev-python/zstandard
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-14 12:27:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-14 12:27:14 +0100
commitf7adcd4ee556b2c3a420239c13fb74113d791f6a (patch)
tree1cc566bbd03612996262177e95152bdda507cca9 /dev-python/zstandard
parent482a48c0e1675b1e92663b8b5222bb7261aa7956 (diff)
gentoo auto-resync : 14:07:2024 - 12:27:13
Diffstat (limited to 'dev-python/zstandard')
-rw-r--r--dev-python/zstandard/Manifest1
-rw-r--r--dev-python/zstandard/zstandard-0.22.0-r1.ebuild80
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/zstandard/Manifest b/dev-python/zstandard/Manifest
index 7c9d43d70969..90b5563fe341 100644
--- a/dev-python/zstandard/Manifest
+++ b/dev-python/zstandard/Manifest
@@ -1,4 +1,5 @@
AUX zstandard-0.22.0-build.patch 2228 BLAKE2B a8c2b6ef7cfb0a6f4037f25505ab6f81875f760078165e89d4956af022e074cf8b55c20a4a78b6a1eee3f5e1711b3b4c78b432cf58f582d21a005e9921f993b2 SHA512 25ecb4ec764af46af104e8e1fa5a4a2e0a8a5f312cac582d6c740b36c0b43af403028c04aae2bda3238f7d73b88dd863d3624e211e87a3eafe63a7a603324891
DIST python-zstandard-0.22.0.gh.tar.gz 707644 BLAKE2B ce400120f9106d729b50ae091a581f4a9fb2e796ec0872cb7db393aa7a55cf6e22cbff79c3ff780b4f609fbd8289a9744cbdfc730ba51cb09ee4e7c56b1dac9e SHA512 b3041217ad4b6297d0727dd5d22bc83645d43fa591985bef43e8633feb960310a3f2eb1edaa133595941a6932683af91d565266f312c987e6b6c514ce70c9ddb
+EBUILD zstandard-0.22.0-r1.ebuild 1876 BLAKE2B 833eee52d3ad7d7bc70507f180db473667b1e00baff22b76d7af5556055899b71d823c82aaa46c769f8575ef9dbc2830295ef10f79a99ae20bddd1b927416f50 SHA512 c76f10de7f383598ac8613627e032ba098f68453603d1ba2258beabde2ef9983aec3498aece7561a81cb79e59a8c3483a7e1129aa957e661e6115421f58fd210
EBUILD zstandard-0.22.0.ebuild 1812 BLAKE2B c0ac8c41590d5f7625fb292c5e76e8cd428f52f8bbd727b6230e9d29e0a8c766efda3a06b7cb7930eb83c16c82ee61aafa65a076b0eed9d2c7755041a5184801 SHA512 e5ef2722040f67e606c1257ecb213615cd17f03b9b47650033d5215c4abf18cfd0e41783ffa7b1fbcf5a722041b6a400a585c74afb13b44bd1a26c739f4bfd6b
MISC metadata.xml 378 BLAKE2B dd5834c84bb375812b3a3cfcc00d29aa43ac8954b044e188e8f38bdca93fdf1ce98fe78b78dbeccd935c83ca10f3ce18f893e5720dd8991118b6c69149a4ac61 SHA512 06554d973b525d53c680c3e43041f33125dad222339e645294fbc22670a7eadb0e9bf8a3b0771d2b2fb8f136d958eadb32c295179d1547c50ae26754360609f3
diff --git a/dev-python/zstandard/zstandard-0.22.0-r1.ebuild b/dev-python/zstandard/zstandard-0.22.0-r1.ebuild
new file mode 100644
index 000000000000..ef506d368106
--- /dev/null
+++ b/dev-python/zstandard/zstandard-0.22.0-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+inherit distutils-r1
+
+MY_P=python-zstandard-${PV}
+DESCRIPTION="Zstandard Bindings for Python"
+HOMEPAGE="
+ https://github.com/indygreg/python-zstandard/
+ https://pypi.org/project/zstandard/
+"
+SRC_URI="
+ https://github.com/indygreg/python-zstandard/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+DEPEND="
+ app-arch/zstd:=
+"
+RDEPEND="
+ ${DEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/cffi-1.14.0-r2:=[${PYTHON_USEDEP}]
+ ' 'python*')
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+ )
+
+ # the C backend is repeatedly broken, so force CFFI instead
+ sed -e '/PYTHON_ZSTANDARD_IMPORT_POLICY/s:default:cffi:' \
+ -i zstandard/__init__.py || die
+ # unbundle zstd
+ rm zstd/* || die
+ > zstd/zstd.c || die
+ # it does random preprocessing on that, so we can't use #include
+ local f
+ for f in zdict.h zstd.h; do
+ cp "${ESYSROOT}/usr/include/${f}" "zstd/${f}" || die
+ done
+ sed -i -e '/include_dirs/a libraries=["zstd"],' make_cffi.py || die
+
+ distutils-r1_src_prepare
+
+ DISTUTILS_ARGS=(
+ --no-c-backend
+ )
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # unreliable, fails on x86
+ tests/test_data_structures.py::TestCompressionParameters::test_estimated_compression_context_size
+ # check for bundled zstd version, fails on other system zstd
+ tests/test_module_attributes.py::TestModuleAttributes::test_version
+ )
+
+ rm -rf zstandard || die
+ epytest
+}