1 |
commit: 5c67ed82e4fee9516ced80503d1090c9f6e62872 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 29 12:51:13 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 29 12:54:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c67ed82 |
7 |
|
8 |
dev-python/distlib: Switch to PEP 517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/distlib/distlib-0.3.4-r1.ebuild | 53 ++++++++++++++++++++++++++++++ |
13 |
1 file changed, 53 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/distlib/distlib-0.3.4-r1.ebuild b/dev-python/distlib/distlib-0.3.4-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..fced61f71451 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/distlib/distlib-0.3.4-r1.ebuild |
20 |
@@ -0,0 +1,53 @@ |
21 |
+# Copyright 2021-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
28 |
+ |
29 |
+inherit distutils-r1 vcs-snapshot |
30 |
+ |
31 |
+DESCRIPTION="Low-level components of distutils2/packaging" |
32 |
+HOMEPAGE="https://pypi.org/project/distlib/ |
33 |
+ https://bitbucket.org/pypa/distlib/" |
34 |
+# pypi has zip only :-( |
35 |
+SRC_URI=" |
36 |
+ https://bitbucket.org/pypa/distlib/get/${PV}.tar.bz2 -> ${P}.tar.bz2" |
37 |
+ |
38 |
+LICENSE="PSF-2" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" |
41 |
+IUSE="test" |
42 |
+# This package's tests are extremely fragile and tend to break or hang |
43 |
+# when it doesn't like metadata of packages installed on the system. |
44 |
+RESTRICT="test" |
45 |
+ |
46 |
+# pypiserver is called as external executable |
47 |
+# openpyxl installs invalid metadata that breaks distlib |
48 |
+BDEPEND=" |
49 |
+ test? ( |
50 |
+ dev-python/pypiserver |
51 |
+ !!<dev-python/openpyxl-3.0.3[${PYTHON_USEDEP}] |
52 |
+ )" |
53 |
+ |
54 |
+src_prepare() { |
55 |
+ # make sure they're not used |
56 |
+ rm tests/pypi-server-standalone.py || die |
57 |
+ |
58 |
+ # use system pypiserver instead of broken bundled one |
59 |
+ eapply "${FILESDIR}"/distlib-0.3.2-system-pypiserver.py || die |
60 |
+ |
61 |
+ # doesn't work with our patched pip |
62 |
+ sed -e '/PIP_AVAIL/s:True:False:' \ |
63 |
+ -i tests/test_wheel.py || die |
64 |
+ |
65 |
+ distutils-r1_src_prepare |
66 |
+} |
67 |
+ |
68 |
+python_test() { |
69 |
+ local -x SKIP_ONLINE=1 |
70 |
+ local -x PYTHONHASHSEED=0 |
71 |
+ "${EPYTHON}" tests/test_all.py -v -x || |
72 |
+ die "Tests failed with ${EPYTHON}" |
73 |
+} |