Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/packaging/
Date: Wed, 26 Jan 2022 11:32:38
Message-Id: 1643195814.56ec07d2fb237b38f389c2ffdfa5ea688c946b2c.mgorny@gentoo
1 commit: 56ec07d2fb237b38f389c2ffdfa5ea688c946b2c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 26 11:15:34 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 26 11:16:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56ec07d2
7
8 dev-python/packaging: Use flit to ease bootstrap
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/packaging/packaging-21.3-r2.ebuild | 49 +++++++++++++++++++++++++++
13 1 file changed, 49 insertions(+)
14
15 diff --git a/dev-python/packaging/packaging-21.3-r2.ebuild b/dev-python/packaging/packaging-21.3-r2.ebuild
16 new file mode 100644
17 index 000000000000..44c954f2a123
18 --- /dev/null
19 +++ b/dev-python/packaging/packaging-21.3-r2.ebuild
20 @@ -0,0 +1,49 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
25 +EAPI=7
26 +
27 +DISTUTILS_USE_PEP517=flit
28 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
29 +inherit distutils-r1
30 +
31 +DESCRIPTION="Core utilities for Python packages"
32 +HOMEPAGE="
33 + https://github.com/pypa/packaging/
34 + https://pypi.org/project/packaging/"
35 +SRC_URI="
36 + https://github.com/pypa/packaging/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
37 +
38 +SLOT="0"
39 +LICENSE="|| ( Apache-2.0 BSD-2 )"
40 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
41 +
42 +RDEPEND="
43 + >=dev-python/pyparsing-3.0.6[${PYTHON_USEDEP}]
44 +"
45 +DEPEND="
46 + test? (
47 + dev-python/pretend[${PYTHON_USEDEP}]
48 + )
49 +"
50 +
51 +distutils_enable_tests pytest
52 +
53 +src_configure() {
54 + # write a custom pyproject.toml to ease setuptools bootstrap
55 + cat > pyproject.toml <<-EOF || die
56 + [build-system]
57 + requires = ["flit_core >=3.2,<4"]
58 + build-backend = "flit_core.buildapi"
59 +
60 + [project]
61 + name = "packaging"
62 + dynamic = ["version"]
63 + description = "More routines for operating on iterables, beyond itertools"
64 + EOF
65 +}
66 +
67 +python_test() {
68 + epytest --capture=no
69 +}