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/appdirs/
Date: Wed, 26 Jan 2022 11:32:39
Message-Id: 1643196724.ad85a2d854901f4a010f68017afafa37d5d097d0.mgorny@gentoo
1 commit: ad85a2d854901f4a010f68017afafa37d5d097d0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 26 11:28:01 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 26 11:32:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad85a2d8
7
8 dev-python/appdirs: Use flit to ease bootstrap
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/appdirs/appdirs-1.4.4-r2.ebuild | 37 ++++++++++++++++++++++++++++++
13 1 file changed, 37 insertions(+)
14
15 diff --git a/dev-python/appdirs/appdirs-1.4.4-r2.ebuild b/dev-python/appdirs/appdirs-1.4.4-r2.ebuild
16 new file mode 100644
17 index 000000000000..c65226ccfc69
18 --- /dev/null
19 +++ b/dev-python/appdirs/appdirs-1.4.4-r2.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 +# 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 +
30 +inherit distutils-r1
31 +
32 +DESCRIPTION="Module for determining appropriate platform-specific dirs"
33 +HOMEPAGE="https://github.com/ActiveState/appdirs"
34 +SRC_URI="https://github.com/ActiveState/${PN}/archive/${PV}.tar.gz -> ${P}.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-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
39 +
40 +src_configure() {
41 + [[ -e pyproject.toml ]] &&
42 + die "Upstream added pyproject.toml, recheck"
43 + # write a custom pyproject.toml to ease setuptools bootstrap
44 + cat > pyproject.toml <<-EOF || die
45 + [build-system]
46 + requires = ["flit_core >=3.2,<4"]
47 + build-backend = "flit_core.buildapi"
48 +
49 + [project]
50 + name = "appdirs"
51 + dynamic = ["version", "description"]
52 + EOF
53 +}
54 +
55 +python_test() {
56 + "${PYTHON}" test/test_api.py -v || die "Tests fail with ${EPYTHON}"
57 +}