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/jaraco-context/
Date: Thu, 03 Feb 2022 10:58:24
Message-Id: 1643885894.2d1c86a2807c9b92bf343c82f78fbf4f45619113.mgorny@gentoo
1 commit: 2d1c86a2807c9b92bf343c82f78fbf4f45619113
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 3 10:12:17 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 3 10:58:14 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d1c86a2
7
8 dev-python/jaraco-context: Use flit to build (for bootstrap)
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../jaraco-context/jaraco-context-4.1.1-r1.ebuild | 37 ++++++++++++++++++++++
13 1 file changed, 37 insertions(+)
14
15 diff --git a/dev-python/jaraco-context/jaraco-context-4.1.1-r1.ebuild b/dev-python/jaraco-context/jaraco-context-4.1.1-r1.ebuild
16 new file mode 100644
17 index 000000000000..caff446d88cb
18 --- /dev/null
19 +++ b/dev-python/jaraco-context/jaraco-context-4.1.1-r1.ebuild
20 @@ -0,0 +1,37 @@
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 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
28 +
29 +inherit distutils-r1
30 +
31 +MY_P=${P/-/.}
32 +DESCRIPTION="Context managers by jaraco"
33 +HOMEPAGE="https://github.com/jaraco/jaraco.context"
34 +SRC_URI="mirror://pypi/${PN:0:1}/${PN/-/.}/${MY_P}.tar.gz"
35 +S="${WORKDIR}/${MY_P}"
36 +
37 +LICENSE="MIT"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~x86"
40 +
41 +distutils_enable_tests pytest
42 +
43 +src_configure() {
44 + grep -q 'build-backend = "setuptools' pyproject.toml ||
45 + die "Upstream changed build-backend, recheck"
46 + # write a custom pyproject.toml to ease setuptools bootstrap
47 + cat > pyproject.toml <<-EOF || die
48 + [build-system]
49 + requires = ["flit_core >=3.2,<4"]
50 + build-backend = "flit_core.buildapi"
51 +
52 + [project]
53 + name = "jaraco.context"
54 + version = "${PV}"
55 + description = "Context managers by jaraco"
56 + EOF
57 +}