1 |
commit: 61c5989c2dbf7f8cda0e4062b4af539085103758 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 29 18:37:06 2022 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 29 18:37:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c5989c |
7 |
|
8 |
dev-python/reflink: EAPI=8, Use PEP517 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/reflink/reflink-0.2.1-r2.ebuild | 48 ++++++++++++++++++++++++++++++ |
13 |
1 file changed, 48 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/reflink/reflink-0.2.1-r2.ebuild b/dev-python/reflink/reflink-0.2.1-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..d07e6fb4a670 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/reflink/reflink-0.2.1-r2.ebuild |
20 |
@@ -0,0 +1,48 @@ |
21 |
+# Copyright 2019-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_{7,8,9} ) |
28 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
29 |
+ |
30 |
+inherit distutils-r1 |
31 |
+ |
32 |
+DESCRIPTION="Python wrapper around the reflink system calls" |
33 |
+HOMEPAGE="https://gitlab.com/rubdos/pyreflink" |
34 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="MIT" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
39 |
+ |
40 |
+RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]" |
41 |
+DEPEND="${RDEPEND}" |
42 |
+BDEPEND="${RDEPEND} |
43 |
+ test? ( sys-fs/btrfs-progs ) |
44 |
+" |
45 |
+ |
46 |
+distutils_enable_sphinx docs |
47 |
+distutils_enable_tests pytest |
48 |
+ |
49 |
+python_prepare_all() { |
50 |
+ sed -e 's|'\''pytest-runner'\'',\?||' -i setup.py || die |
51 |
+ distutils-r1_python_prepare_all |
52 |
+} |
53 |
+ |
54 |
+python_test() { |
55 |
+ local notestmsg="Tests need FEATURES='-usersandbox -userpriv -sandbox'" |
56 |
+ if [[ ${EUID} != 0 ]]; then |
57 |
+ ewarn "${notestmsg}" |
58 |
+ elif |
59 |
+ has sandbox ${FEATURES}; then |
60 |
+ ewarn "${notestmsg}" |
61 |
+ else |
62 |
+ pushd "${BUILD_DIR}"/lib >/dev/null || die |
63 |
+ # module import will fail with any other directory structure |
64 |
+ cp -rv "${S}"/tests ./ || die |
65 |
+ pytest -vv || die "Tests fail with ${EPYTHON}" |
66 |
+ popd >/dev/null || die |
67 |
+ fi |
68 |
+} |