commit:     91b9f7bfb186fa81d8a40c57431c8733a105f895
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  2 23:28:36 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Nov  2 23:40:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91b9f7bf

dev-python/pytest-salt-factories: revbump, py311. eapi 8

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/pytest-salt-factories/Manifest          |  1 +
 .../pytest-salt-factories-1.0.0_rc20-r1.ebuild     | 77 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/dev-python/pytest-salt-factories/Manifest 
b/dev-python/pytest-salt-factories/Manifest
index a18552b8f1fb..cac5c3882756 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1,3 +1,4 @@
 DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 
92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00
 SHA512 
32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
 DIST pytest-salt-factories-1.0.0_rc13.tar.gz 148418 BLAKE2B 
3688f05d137df23266ebc7e999bc3b3a8ec198173b38dc98bd4a1e2655b982a37485278691e970da0be700cee6f609c57933b041a6d8403e75fb197f5d23d5d4
 SHA512 
f3713410704540ee48b7263973d3a9bf3159fb63e53e5ef5002201aea3fdcf0b4eaf00e1dd1e67d869b42242985d8117a117568d63abf5ad366e247fb3e1d83f
+DIST pytest-salt-factories-1.0.0_rc20.gh.tar.gz 160140 BLAKE2B 
7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063
 SHA512 
5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b
 DIST pytest-salt-factories-1.0.0_rc20.tar.gz 160140 BLAKE2B 
7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063
 SHA512 
5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b

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
new file mode 100644
index 000000000000..9c7b42c4dcc6
--- /dev/null
+++ 
b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1
+
+DESCRIPTION="The new generation of the pytest-salt Plugin"
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories";
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV//_/}.tar.gz -> 
${P}.gh.tar.gz"
+S=${WORKDIR}/${PN}-${PV//_/}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+IUSE="test"
+
+RDEPEND="
+       dev-python/attrs[${PYTHON_USEDEP}]
+       dev-python/pytest-tempdir[${PYTHON_USEDEP}]
+       dev-python/psutil[${PYTHON_USEDEP}]
+       >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
+       dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
+       dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
+       dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
+       >=dev-python/pytest-shell-utilities-1.4.0[${PYTHON_USEDEP}]
+       dev-python/pyzmq[${PYTHON_USEDEP}]
+       dev-python/msgpack[${PYTHON_USEDEP}]
+       dev-python/virtualenv[${PYTHON_USEDEP}]
+       >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       ${RDEPEND}
+       test? (
+               dev-python/pyfakefs[${PYTHON_USEDEP}]
+               dev-python/pytest-subtests[${PYTHON_USEDEP}]
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}/pytest-salt-factories-1.0.0_rc20-tests.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+       sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" 
-i setup.py || die
+       sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
+
+       sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
+       printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || 
die
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       local tempdir
+
+       local -a disable_tests=(
+               testexcludetest
+       )
+       local textexpr
+       testexpr=$(printf 'not %s and ' "${disable_tests[@]}")
+
+       # ${T} is too long a path for the tests to work
+       tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" || die
+       addwrite "${tempdir}"
+
+       (
+               cleanup() { rm -rf "${tempdir}" || die; }
+
+               trap cleanup EXIT
+               export SHELL="/bin/bash" TMPDIR="${tempdir}"
+               epytest -vv -k "${testexpr%and }"
+       )
+}

Reply via email to