Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/
Date: Wed, 02 Nov 2022 23:40:22
Message-Id: 1667432409.91b9f7bfb186fa81d8a40c57431c8733a105f895.chutzpah@gentoo
1 commit: 91b9f7bfb186fa81d8a40c57431c8733a105f895
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 2 23:28:36 2022 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 23:40:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91b9f7bf
7
8 dev-python/pytest-salt-factories: revbump, py311. eapi 8
9
10 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
11
12 dev-python/pytest-salt-factories/Manifest | 1 +
13 .../pytest-salt-factories-1.0.0_rc20-r1.ebuild | 77 ++++++++++++++++++++++
14 2 files changed, 78 insertions(+)
15
16 diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
17 index a18552b8f1fb..cac5c3882756 100644
18 --- a/dev-python/pytest-salt-factories/Manifest
19 +++ b/dev-python/pytest-salt-factories/Manifest
20 @@ -1,3 +1,4 @@
21 DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
22 DIST pytest-salt-factories-1.0.0_rc13.tar.gz 148418 BLAKE2B 3688f05d137df23266ebc7e999bc3b3a8ec198173b38dc98bd4a1e2655b982a37485278691e970da0be700cee6f609c57933b041a6d8403e75fb197f5d23d5d4 SHA512 f3713410704540ee48b7263973d3a9bf3159fb63e53e5ef5002201aea3fdcf0b4eaf00e1dd1e67d869b42242985d8117a117568d63abf5ad366e247fb3e1d83f
23 +DIST pytest-salt-factories-1.0.0_rc20.gh.tar.gz 160140 BLAKE2B 7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063 SHA512 5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b
24 DIST pytest-salt-factories-1.0.0_rc20.tar.gz 160140 BLAKE2B 7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063 SHA512 5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b
25
26 diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild
27 new file mode 100644
28 index 000000000000..9c7b42c4dcc6
29 --- /dev/null
30 +++ b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild
31 @@ -0,0 +1,77 @@
32 +# Copyright 2020-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +PYTHON_COMPAT=( python3_{8..11} )
38 +DISTUTILS_USE_PEP517=setuptools
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="The new generation of the pytest-salt Plugin"
42 +HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
43 +SRC_URI="https://github.com/saltstack/${PN}/archive/${PV//_/}.tar.gz -> ${P}.gh.tar.gz"
44 +S=${WORKDIR}/${PN}-${PV//_/}
45 +
46 +LICENSE="Apache-2.0"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
49 +IUSE="test"
50 +
51 +RDEPEND="
52 + dev-python/attrs[${PYTHON_USEDEP}]
53 + dev-python/pytest-tempdir[${PYTHON_USEDEP}]
54 + dev-python/psutil[${PYTHON_USEDEP}]
55 + >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
56 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
57 + dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
58 + dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
59 + >=dev-python/pytest-shell-utilities-1.4.0[${PYTHON_USEDEP}]
60 + dev-python/pyzmq[${PYTHON_USEDEP}]
61 + dev-python/msgpack[${PYTHON_USEDEP}]
62 + dev-python/virtualenv[${PYTHON_USEDEP}]
63 + >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
64 +"
65 +BDEPEND="
66 + ${RDEPEND}
67 + test? (
68 + dev-python/pyfakefs[${PYTHON_USEDEP}]
69 + dev-python/pytest-subtests[${PYTHON_USEDEP}]
70 + )
71 +"
72 +
73 +PATCHES=(
74 + "${FILESDIR}/pytest-salt-factories-1.0.0_rc20-tests.patch"
75 +)
76 +
77 +distutils_enable_tests pytest
78 +
79 +python_prepare_all() {
80 + sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
81 + sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
82 +
83 + sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
84 + printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || die
85 + distutils-r1_python_prepare_all
86 +}
87 +
88 +python_test() {
89 + local tempdir
90 +
91 + local -a disable_tests=(
92 + testexcludetest
93 + )
94 + local textexpr
95 + testexpr=$(printf 'not %s and ' "${disable_tests[@]}")
96 +
97 + # ${T} is too long a path for the tests to work
98 + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" || die
99 + addwrite "${tempdir}"
100 +
101 + (
102 + cleanup() { rm -rf "${tempdir}" || die; }
103 +
104 + trap cleanup EXIT
105 + export SHELL="/bin/bash" TMPDIR="${tempdir}"
106 + epytest -vv -k "${testexpr%and }"
107 + )
108 +}