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/hatchling/
Date: Sat, 31 Dec 2022 07:18:57
Message-Id: 1672470880.8d391c0e517b161b14cb1b8412013f220631fb23.mgorny@gentoo
1 commit: 8d391c0e517b161b14cb1b8412013f220631fb23
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 31 05:44:56 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 31 07:14:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d391c0e
7
8 dev-python/hatchling: Bump to 1.12.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/hatchling/Manifest | 1 +
13 dev-python/hatchling/hatchling-1.12.0.ebuild | 77 ++++++++++++++++++++++++++++
14 2 files changed, 78 insertions(+)
15
16 diff --git a/dev-python/hatchling/Manifest b/dev-python/hatchling/Manifest
17 index 68a7c9ea51bb..9f3d31e68e79 100644
18 --- a/dev-python/hatchling/Manifest
19 +++ b/dev-python/hatchling/Manifest
20 @@ -1 +1,2 @@
21 DIST hatch-hatchling-v1.11.1.gh.tar.gz 367624 BLAKE2B 006f9f9ab266eba7b7e489d4359a9ddb17a6e079c31e189662da8c4d090884eeae4bf108301d5c315d823e92cb813841e41211cc55618f4ee9109bccdde61e1e SHA512 7bdf5a2930950503dbe534f6ead724ed84420193ba55137600a5b98a085e94588e333bb5a14ad944746dc400522ebbea4849718686420fd6ed7de3d6e8852d8e
22 +DIST hatch-hatchling-v1.12.0.gh.tar.gz 379902 BLAKE2B 831ab78bff6a039a1941ca171aaccbfb97d1d31c14505d3dde60ee4283b317cc80b6e6072b63fe9e69cccbf759bf4f7db6a371502451ffa5303547273e8d2341 SHA512 40c1684bcc730e809cdbda9d15494f07bead69b1b4bf9c98a1d2a84d2053bb7b104d6bcab1e72a4de66081dd839b7ccae96d877760353e3528e8676cea5d2a5c
23
24 diff --git a/dev-python/hatchling/hatchling-1.12.0.ebuild b/dev-python/hatchling/hatchling-1.12.0.ebuild
25 new file mode 100644
26 index 000000000000..20362b7c383c
27 --- /dev/null
28 +++ b/dev-python/hatchling/hatchling-1.12.0.ebuild
29 @@ -0,0 +1,77 @@
30 +# Copyright 2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=standalone
36 +PYTHON_TESTED=( pypy3 python3_{8..11} )
37 +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
38 +
39 +inherit distutils-r1
40 +
41 +TAG=${P/-/-v}
42 +MY_P=hatch-${TAG}
43 +DESCRIPTION="Modern, extensible Python build backend"
44 +HOMEPAGE="
45 + https://pypi.org/project/hatchling/
46 + https://github.com/pypa/hatch/
47 +"
48 +SRC_URI="
49 + https://github.com/pypa/hatch/archive/${TAG}.tar.gz
50 + -> ${MY_P}.gh.tar.gz
51 +"
52 +S=${WORKDIR}/${MY_P}/backend
53 +
54 +LICENSE="MIT"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
57 +
58 +# deps are listed in backend/src/hatchling/ouroboros.py
59 +RDEPEND="
60 + >=dev-python/editables-0.3[${PYTHON_USEDEP}]
61 + >=dev-python/packaging-21.3[${PYTHON_USEDEP}]
62 + >=dev-python/pathspec-0.10.1[${PYTHON_USEDEP}]
63 + >=dev-python/pluggy-1.0.0[${PYTHON_USEDEP}]
64 + $(python_gen_cond_dep '
65 + >=dev-python/tomli-1.2.2[${PYTHON_USEDEP}]
66 + ' 3.8 3.9 3.10)
67 +"
68 +BDEPEND="
69 + ${RDEPEND}
70 + test? (
71 + $(python_gen_cond_dep '
72 + dev-python/atomicwrites[${PYTHON_USEDEP}]
73 + dev-python/click[${PYTHON_USEDEP}]
74 + dev-python/httpx[${PYTHON_USEDEP}]
75 + dev-python/platformdirs[${PYTHON_USEDEP}]
76 + dev-python/rich[${PYTHON_USEDEP}]
77 + dev-python/tomli-w[${PYTHON_USEDEP}]
78 + dev-python/virtualenv[${PYTHON_USEDEP}]
79 + ' "${PYTHON_TESTED[@]}")
80 + )
81 +"
82 +
83 +distutils_enable_tests pytest
84 +
85 +python_test() {
86 + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
87 + einfo "Skipping tests on ${EPYTHON}"
88 + return
89 + fi
90 +
91 + local -x EPYTEST_DESELECT=(
92 + # these run pip to install stuff
93 + tests/backend/dep/test_core.py::test_dependency_found
94 + tests/backend/dep/test_core.py::test_extra_met
95 + tests/backend/dep/test_core.py::test_extra_no_dependencies
96 + tests/backend/dep/test_core.py::test_extra_unmet
97 + tests/backend/dep/test_core.py::test_unknown_extra
98 + tests/backend/dep/test_core.py::test_version_unmet
99 + )
100 +
101 + # top-level "tests" directory contains tests both for hatch
102 + # and hatchling
103 + cd "${WORKDIR}/${MY_P}" || die
104 + local -x PYTHONPATH="src:${PYTHONPATH}"
105 + epytest tests/backend
106 +}