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/wheel/
Date: Wed, 26 Jan 2022 12:21:44
Message-Id: 1643199696.11e691ee9b5d9b8b56c1289163cefb7f1fcfa534.mgorny@gentoo
1 commit: 11e691ee9b5d9b8b56c1289163cefb7f1fcfa534
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 26 12:12:23 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 26 12:21:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11e691ee
7
8 dev-python/wheel: Use flit to ease bootstrap
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/wheel/wheel-0.37.1-r1.ebuild | 61 +++++++++++++++++++++++++++++++++
13 1 file changed, 61 insertions(+)
14
15 diff --git a/dev-python/wheel/wheel-0.37.1-r1.ebuild b/dev-python/wheel/wheel-0.37.1-r1.ebuild
16 new file mode 100644
17 index 000000000000..a271177181e7
18 --- /dev/null
19 +++ b/dev-python/wheel/wheel-0.37.1-r1.ebuild
20 @@ -0,0 +1,61 @@
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="A built-package format for Python"
32 +HOMEPAGE="https://pypi.org/project/wheel/"
33 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
34 +SRC_URI="https://github.com/pypa/wheel/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
35 +
36 +LICENSE="MIT"
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 + dev-python/packaging[${PYTHON_USEDEP}]"
42 +BDEPEND="
43 + test? (
44 + dev-python/setuptools[${PYTHON_USEDEP}]
45 + )"
46 +
47 +distutils_enable_tests pytest
48 +
49 +src_prepare() {
50 + sed \
51 + -e 's:--cov --cov-config=setup.cfg::g' \
52 + -i setup.cfg || die
53 +
54 + # unbundle packaging
55 + rm -r src/wheel/vendored || die
56 + sed -i -e 's:\.vendored\.::' src/wheel/*.py || die
57 +
58 + distutils-r1_src_prepare
59 +}
60 +
61 +src_configure() {
62 + [[ -e pyproject.toml ]] &&
63 + die "Upstream added pyproject.toml, recheck"
64 + # write a custom pyproject.toml to ease setuptools bootstrap
65 + cat > pyproject.toml <<-EOF || die
66 + [build-system]
67 + requires = ["flit_core >=3.2,<4"]
68 + build-backend = "flit_core.buildapi"
69 +
70 + [project]
71 + name = "wheel"
72 + description = "A built-package format for Python"
73 + dynamic = ["version"]
74 +
75 + [project.scripts]
76 + wheel = "wheel.cli:main"
77 +
78 + [project.entry-points."distutils.commands"]
79 + bdist_wheel = "wheel.bdist_wheel:bdist_wheel"
80 + EOF
81 +}