diff options
author | Matt Jolly <Matt.Jolly@footclan.ninja> | 2022-08-25 18:09:43 +1000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-08-26 08:18:49 +0100 |
commit | 16dae49cee3ea8253f25830b3e0c1c74e68df4c0 (patch) | |
tree | d1e8e20b92cbef92e0369bb1ccc39574b7cd9076 /dev-python/pytest-twisted | |
parent | net-p2p/deluge: add 2.1.1, update 9999 (diff) | |
download | gentoo-16dae49cee3ea8253f25830b3e0c1c74e68df4c0.tar.gz gentoo-16dae49cee3ea8253f25830b3e0c1c74e68df4c0.tar.bz2 gentoo-16dae49cee3ea8253f25830b3e0c1c74e68df4c0.zip |
dev-python/pytest-twisted: new package, add 1.13.4
Signed-off-by: Matt Jolly <Matt.Jolly@footclan.ninja>
Closes: https://github.com/gentoo/gentoo/pull/26903
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pytest-twisted')
-rw-r--r-- | dev-python/pytest-twisted/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pytest-twisted/metadata.xml | 15 | ||||
-rw-r--r-- | dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild | 47 |
3 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/pytest-twisted/Manifest b/dev-python/pytest-twisted/Manifest new file mode 100644 index 000000000000..dc6c53d82ef4 --- /dev/null +++ b/dev-python/pytest-twisted/Manifest @@ -0,0 +1 @@ +DIST pytest-twisted-1.13.4.tar.gz 15687 BLAKE2B 8e1024da02a5a1c9c33df96c18a355b9be5757446d9f5495ba1f043c15a2e44efd6e59693986a0684d77b8518393ce9f382d62e3d1e5b903876e8cff34efb427 SHA512 99899ad73f87582023a0e639986a287b4571638be4f1ae134078a15a4d4bebd24153f813c993382603edc14306c12931e2daf517d7998e48d3d19b8469c0b7aa diff --git a/dev-python/pytest-twisted/metadata.xml b/dev-python/pytest-twisted/metadata.xml new file mode 100644 index 000000000000..2d0071fe9c21 --- /dev/null +++ b/dev-python/pytest-twisted/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="github">pytest-dev/pytest-twisted</remote-id> + </upstream> + <maintainer type="person"> + <email>Matt.Jolly@footclan.ninja</email> + <name>Matt Jolly</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Gentoo Proxy Maintainers Project</name> + </maintainer> +</pkgmetadata> diff --git a/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild b/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild new file mode 100644 index 000000000000..7f0af08f78f5 --- /dev/null +++ b/dev-python/pytest-twisted/pytest-twisted-1.13.4.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-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="pytest-twisted is a plugin for pytest that allows you to test code which uses the twisted framework" +HOMEPAGE="https://github.com/pytest-dev/pytest-twisted" +SRC_URI="https://github.com/pytest-dev/pytest-twisted/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-python/decorator[${PYTHON_USEDEP}] + dev-python/greenlet[${PYTHON_USEDEP}] + >=dev-python/pytest-2.3[${PYTHON_USEDEP}] + dev-python/twisted[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +src_prepare() { + # https://github.com/pytest-dev/pytest/issues/9280 + sed -e '/^pytest_plugins =/d' -i testing/conftest.py || die + + distutils-r1_src_prepare +} + +python_test() { + epytest -p pytester +} + +src_install() { + # If we let pytest-twisted autoload everywhere, it breaks tests in + # packages that don't expect it. Apply a similar hack as for bug + # #661218. We can't do this in src_prepare() because the tests need + # autoloading enabled. + sed -e 's/"pytest11": \[[^]]*\]//' -i setup.py || die + + distutils-r1_src_install +} |