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/importlib_resources/
Date: Thu, 03 Feb 2022 10:58:25
Message-Id: 1643885896.08972a9b766dac0f84fb86e50afbfcacde40b6fd.mgorny@gentoo
1 commit: 08972a9b766dac0f84fb86e50afbfcacde40b6fd
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 3 10:19:45 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 3 10:58:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08972a9b
7
8 dev-python/importlib_resources: Use flit to build (for bootstrap)
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../importlib_resources-5.4.0-r3.ebuild | 42 ++++++++++++++++++++++
13 1 file changed, 42 insertions(+)
14
15 diff --git a/dev-python/importlib_resources/importlib_resources-5.4.0-r3.ebuild b/dev-python/importlib_resources/importlib_resources-5.4.0-r3.ebuild
16 new file mode 100644
17 index 000000000000..c63e09472b65
18 --- /dev/null
19 +++ b/dev-python/importlib_resources/importlib_resources-5.4.0-r3.ebuild
20 @@ -0,0 +1,42 @@
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=flit
27 +# This is a backport of Python 3.9's importlib.resources
28 +PYTHON_COMPAT=( pypy3 python3_8 )
29 +
30 +inherit distutils-r1
31 +
32 +DESCRIPTION="Read resources from Python packages"
33 +HOMEPAGE="https://github.com/python/importlib_resources"
34 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
35 +
36 +LICENSE="Apache-2.0"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
39 +
40 +RDEPEND="
41 + $(python_gen_cond_dep '
42 + dev-python/zipp[${PYTHON_USEDEP}]
43 + ' python3_{8,9} pypy3)"
44 +
45 +distutils_enable_tests unittest
46 +distutils_enable_sphinx docs dev-python/rst-linker dev-python/jaraco-packaging
47 +
48 +src_configure() {
49 + grep -q 'build-backend = "setuptools' pyproject.toml ||
50 + die "Upstream changed build-backend, recheck"
51 + # write a custom pyproject.toml to ease setuptools bootstrap
52 + cat > pyproject.toml <<-EOF || die
53 + [build-system]
54 + requires = ["flit_core >=3.2,<4"]
55 + build-backend = "flit_core.buildapi"
56 +
57 + [project]
58 + name = "importlib_resources"
59 + version = "${PV}"
60 + description = "Read resources from Python packages"
61 + EOF
62 +}