diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2022-11-02 16:28:36 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2022-11-02 16:40:09 -0700 |
commit | 91b9f7bfb186fa81d8a40c57431c8733a105f895 (patch) | |
tree | 2eaed8176aab260a3d18dd7ecf2e1a43d1358c5b /dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild | |
parent | dev-python/pytest-tempdir: update EAPI 7 -> 8 (diff) | |
download | gentoo-91b9f7bfb186fa81d8a40c57431c8733a105f895.tar.gz gentoo-91b9f7bfb186fa81d8a40c57431c8733a105f895.tar.bz2 gentoo-91b9f7bfb186fa81d8a40c57431c8733a105f895.zip |
dev-python/pytest-salt-factories: revbump, py311. eapi 8
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild')
-rw-r--r-- | dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20-r1.ebuild | 77 |
1 files changed, 77 insertions, 0 deletions
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 }" + ) +} |