1 |
commit: e10735eae2b637474f153a97e5d631a57ae6e92b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 19 06:28:05 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 19 07:14:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e10735ea |
7 |
|
8 |
dev-python/zstandard: Use PEP517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/zstandard/zstandard-0.17.0-r1.ebuild | 58 +++++++++++++++++++++++++ |
13 |
1 file changed, 58 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/zstandard/zstandard-0.17.0-r1.ebuild b/dev-python/zstandard/zstandard-0.17.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..e6fc3303e293 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/zstandard/zstandard-0.17.0-r1.ebuild |
20 |
@@ -0,0 +1,58 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
28 |
+ |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+DESCRIPTION="Zstandard Bindings for Python" |
32 |
+HOMEPAGE=" |
33 |
+ https://github.com/indygreg/python-zstandard/ |
34 |
+ https://pypi.org/project/zstandard/ |
35 |
+" |
36 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
37 |
+ |
38 |
+SLOT="0" |
39 |
+LICENSE="BSD" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
41 |
+ |
42 |
+DEPEND=" |
43 |
+ app-arch/zstd:= |
44 |
+" |
45 |
+RDEPEND=" |
46 |
+ ${DEPEND} |
47 |
+ $(python_gen_cond_dep ' |
48 |
+ >=dev-python/cffi-1.14.0-r2:=[${PYTHON_USEDEP}] |
49 |
+ ' 'python*') |
50 |
+" |
51 |
+BDEPEND=" |
52 |
+ test? ( |
53 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
54 |
+ ) |
55 |
+" |
56 |
+ |
57 |
+distutils_enable_tests unittest |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ # the C backend is repeatedly broken, so force CFFI instead |
61 |
+ sed -e '/PYTHON_ZSTANDARD_IMPORT_POLICY/s:default:cffi:' \ |
62 |
+ -i zstandard/__init__.py || die |
63 |
+ # unreliable, fails on x86 |
64 |
+ sed -e 's:test_estimated_compression_context_size:_&:' \ |
65 |
+ -i tests/test_data_structures.py || die |
66 |
+ |
67 |
+ distutils-r1_src_prepare |
68 |
+ |
69 |
+ DISTUTILS_ARGS=( |
70 |
+ --no-c-backend |
71 |
+ --system-zstd |
72 |
+ ) |
73 |
+} |
74 |
+ |
75 |
+src_test() { |
76 |
+ rm -r zstandard || die |
77 |
+ distutils-r1_src_test |
78 |
+} |