dev-python/pytest-xprocess: Kill stale dep on pytest-cache
authorMichał Górny <mgorny@gentoo.org>
Fri, 22 Nov 2019 18:41:23 +0000 (19:41 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 22 Nov 2019 19:38:35 +0000 (20:38 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/pytest-xprocess/files/pytest-xprocess-0.12.1-pytest-28.patch [new file with mode: 0644]
dev-python/pytest-xprocess/pytest-xprocess-0.12.1-r2.ebuild [new file with mode: 0644]

diff --git a/dev-python/pytest-xprocess/files/pytest-xprocess-0.12.1-pytest-28.patch b/dev-python/pytest-xprocess/files/pytest-xprocess-0.12.1-pytest-28.patch
new file mode 100644 (file)
index 0000000..45d3b24
--- /dev/null
@@ -0,0 +1,39 @@
+From 4b5de795b492b5beb15385b20fe289851c1b2570 Mon Sep 17 00:00:00 2001
+From: Bruno Oliveira <nicoddemus@gmail.com>
+Date: Wed, 7 Jun 2017 09:55:28 -0300
+Subject: [PATCH] Add py35 and py36 to CI and drop support for pytest<2.8
+
+Also drop requirement on pytest_cache
+---
+ pytest_xprocess.py | 3 +--
+ setup.py           | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/pytest_xprocess.py b/pytest_xprocess.py
+index e8d731c..c4edbdd 100644
+--- a/pytest_xprocess.py
++++ b/pytest_xprocess.py
+@@ -18,8 +18,7 @@ def pytest_addoption(parser):
+ def getrootdir(config):
+-    from pytest_cache import getrootdir
+-    return getrootdir(config, ".xprocess").ensure(dir=1)
++    return config.rootdir.join(".xprocess").ensure(dir=1)
+ def pytest_cmdline_main(config):
+diff --git a/setup.py b/setup.py
+index 1992785..b3dd88c 100755
+--- a/setup.py
++++ b/setup.py
+@@ -12,5 +12,5 @@ if __name__ == "__main__":
+         url='https://github.com/pytest-dev/pytest-xprocess/',
+         py_modules=['pytest_xprocess', 'xprocess'],
+         entry_points={'pytest11': ['xprocess = pytest_xprocess']},
+-        install_requires=['pytest-cache', 'pytest>=2.3.5', 'psutil'],
++        install_requires=['pytest>=2.8', 'psutil'],
+     )
+-- 
+2.24.0
+
diff --git a/dev-python/pytest-xprocess/pytest-xprocess-0.12.1-r2.ebuild b/dev-python/pytest-xprocess/pytest-xprocess-0.12.1-r2.ebuild
new file mode 100644 (file)
index 0000000..07fafa1
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Manage external processes across test runs"
+HOMEPAGE="https://pypi.org/project/pytest-xprocess/ https://github.com/pytest-dev/pytest-xprocess"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+       dev-python/pytest[${PYTHON_USEDEP}]
+       dev-python/psutil[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+       "${FILESDIR}"/pytest-xprocess-0.12.1-pytest-28.patch
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+       # Upstream's package mistakenly includes __pycache__ directory that make
+       # tests fail.
+       rm -r example/__pycache__ || die
+       distutils-r1_src_prepare
+}