summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2023-04-19 12:32:53 -0700
committerPatrick McLean <chutzpah@gentoo.org>2023-04-20 09:57:55 -0700
commit7cb3289b130c22f01b0b5e6328abdc58aa0fe986 (patch)
treeb5212adfbb695164e98d0d6198c88459a3fb31b6 /dev-python/pytest-salt-factories
parentdev-python/looseversion: new package, add 1.1.2 (diff)
downloadgentoo-7cb3289b130c22f01b0b5e6328abdc58aa0fe986.tar.gz
gentoo-7cb3289b130c22f01b0b5e6328abdc58aa0fe986.tar.bz2
gentoo-7cb3289b130c22f01b0b5e6328abdc58aa0fe986.zip
dev-python/pytest-salt-factories: add 1.0.0_rc23
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/pytest-salt-factories')
-rw-r--r--dev-python/pytest-salt-factories/Manifest1
-rw-r--r--dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc23.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index c6c0b0c7fe21..11ba0bc07919 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1 +1,2 @@
DIST pytest-salt-factories-1.0.0_rc20.gh.tar.gz 160140 BLAKE2B 7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063 SHA512 5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b
+DIST pytest-salt-factories-1.0.0_rc23.gh.tar.gz 162711 BLAKE2B 28610679d7717d7a6f97a2f14a1ac838aec5101171ae65f2328d9b902d04b272c5e37f08d8ff3414af52ff7af954da24c083dfdc4afd1a9342b09cce0bf5aec3 SHA512 22d8f4a1c48a144437b9ff7d064760b59bb2a1003838e07f446a6150a77c162bffa7f21c570f796d8214d870d5b029e92abf7b0410ce19726085b607628364f0
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc23.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc23.ebuild
new file mode 100644
index 000000000000..f3b617e2bc39
--- /dev/null
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc23.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..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/docker-py[${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
+ test_version_info
+ )
+ 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 }"
+ )
+}