summaryrefslogtreecommitdiff
path: root/dev-python/pytest-services
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pytest-services')
-rw-r--r--dev-python/pytest-services/Manifest2
-rw-r--r--dev-python/pytest-services/files/pytest-services-2.0.1-lockdir.patch23
-rw-r--r--dev-python/pytest-services/files/pytest-services-2.0.1-no-mysql.patch25
-rw-r--r--dev-python/pytest-services/metadata.xml13
-rw-r--r--dev-python/pytest-services/pytest-services-2.0.1.ebuild51
-rw-r--r--dev-python/pytest-services/pytest-services-2.1.0.ebuild51
6 files changed, 165 insertions, 0 deletions
diff --git a/dev-python/pytest-services/Manifest b/dev-python/pytest-services/Manifest
new file mode 100644
index 000000000000..a51a355fa8ed
--- /dev/null
+++ b/dev-python/pytest-services/Manifest
@@ -0,0 +1,2 @@
+DIST pytest-services-2.0.1.tar.gz 20386 BLAKE2B 5ec94fdd0fbc5990216fcbae112973fa8b41902a6fa666dd4c5dee2422f76e128ce3a576ec93ecb86bddff5f6bca0e1afaf791583bd275b2543d0e780e45014b SHA512 445cd5346f0c19b68014eb3c27b06376ae6699e31d8c1fee0cb3cda6e927d0ecadbffe3b0b832dd38fe63bc1fe4e3108e2ecbcabf0641af0bdbff019681f0576
+DIST pytest-services-2.1.0.tar.gz 20552 BLAKE2B 6359c419591efed553e095e267c24f78f36b152f0eefe21d46742f7c15f05e92a9e86891f99762a3716fef5284b00d07d8d6eb825008dbbbf07e36dc62a7a6b4 SHA512 54a487546a2af7996acdbcd63bfc01626832aa41683617cdd345453cf6518afdf03cb8c2465e1f5d28c88b2cc801ffb0d9d4440582865f899e21fe42ab431ebc
diff --git a/dev-python/pytest-services/files/pytest-services-2.0.1-lockdir.patch b/dev-python/pytest-services/files/pytest-services-2.0.1-lockdir.patch
new file mode 100644
index 000000000000..0ecf7be8c3c0
--- /dev/null
+++ b/dev-python/pytest-services/files/pytest-services-2.0.1-lockdir.patch
@@ -0,0 +1,23 @@
+diff -ur pytest-services-2.0.1.orig/pytest_services/folders.py pytest-services-2.0.1/pytest_services/folders.py
+--- pytest-services-2.0.1.orig/pytest_services/folders.py 2019-11-12 13:04:01.000000000 -0800
++++ pytest-services-2.0.1/pytest_services/folders.py 2019-11-20 23:26:55.760949590 -0800
+@@ -9,7 +9,7 @@
+ @pytest.fixture(scope='session')
+ def root_dir():
+ """The parent directory of the test base artifact directory."""
+- return '/tmp'
++ return os.getenv("TMPDIR") or '/tmp'
+
+
+ @pytest.yield_fixture(scope='session')
+@@ -47,7 +47,8 @@
+ def memory_root_dir(root_dir):
+ """The parent directory of the test artifact directory in memory."""
+ # check for a free space for at least 8 parallel processes
+- if os.path.exists('/dev/shm') and psutil.disk_usage('/dev/shm').free > 1024 * 1024 * 64 * 10:
++ if os.path.exists('/dev/shm') and psutil.disk_usage('/dev/shm').free > 1024 * 1024 * 64 * 10 \
++ and os.access('/dev/shm', os.W_OK):
+ return '/dev/shm'
+ return root_dir
+
+Only in pytest-services-2.0.1/pytest_services: .folders.py.un~
diff --git a/dev-python/pytest-services/files/pytest-services-2.0.1-no-mysql.patch b/dev-python/pytest-services/files/pytest-services-2.0.1-no-mysql.patch
new file mode 100644
index 000000000000..2a86f5110d5e
--- /dev/null
+++ b/dev-python/pytest-services/files/pytest-services-2.0.1-no-mysql.patch
@@ -0,0 +1,25 @@
+diff -ur pytest-services-2.0.1.orig/tests/test_plugin.py pytest-services-2.0.1/tests/test_plugin.py
+--- pytest-services-2.0.1.orig/tests/test_plugin.py 2019-11-12 13:04:01.000000000 -0800
++++ pytest-services-2.0.1/tests/test_plugin.py 2019-11-20 19:28:17.789932680 -0800
+@@ -3,7 +3,6 @@
+ import socket
+
+ import pylibmc
+-import MySQLdb
+
+
+ def test_memcached(request, memcached, memcached_socket):
+@@ -17,12 +16,6 @@
+ assert mc.get('some') is None
+
+
+-def test_mysql(mysql, mysql_connection, mysql_socket):
+- """Test mysql service."""
+- conn = MySQLdb.connect(user='root', unix_socket=mysql_socket)
+- assert conn
+-
+-
+ def test_xvfb(xvfb, xvfb_display):
+ """Test xvfb service."""
+ socket.create_connection(('127.0.0.1', 6000 + xvfb_display))
+Only in pytest-services-2.0.1/tests: .test_plugin.py.un~
diff --git a/dev-python/pytest-services/metadata.xml b/dev-python/pytest-services/metadata.xml
new file mode 100644
index 000000000000..9a11f3fee604
--- /dev/null
+++ b/dev-python/pytest-services/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pytest-services</remote-id>
+ <remote-id type="github">pytest-dev/pytest-services</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/pytest-services/pytest-services-2.0.1.ebuild b/dev-python/pytest-services/pytest-services-2.0.1.ebuild
new file mode 100644
index 000000000000..7b9808fa2730
--- /dev/null
+++ b/dev-python/pytest-services/pytest-services-2.0.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Collection of fixtures and utility functions to run service processes for pytest"
+HOMEPAGE="https://github.com/pytest-dev/pytest-services"
+SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/zc-lockfile[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? ( ${RDEPEND}
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pylibmc[${PYTHON_USEDEP}]
+ x11-base/xorg-server[xvfb]
+ net-misc/memcached
+ !dev-python/pytest-salt
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/pytest-services-2.0.1-no-mysql.patch"
+ "${FILESDIR}/pytest-services-2.0.1-lockdir.patch"
+)
+
+python_test() {
+ distutils_install_for_testing
+ pytest -vv tests || die "Tests failed under ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ find "${D}" -name '*.pth' -delete || die
+}
diff --git a/dev-python/pytest-services/pytest-services-2.1.0.ebuild b/dev-python/pytest-services/pytest-services-2.1.0.ebuild
new file mode 100644
index 000000000000..60d08abcefa8
--- /dev/null
+++ b/dev-python/pytest-services/pytest-services-2.1.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Collection of fixtures and utility functions to run service processes for pytest"
+HOMEPAGE="https://github.com/pytest-dev/pytest-services"
+SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/zc-lockfile[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? ( ${RDEPEND}
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pylibmc[${PYTHON_USEDEP}]
+ x11-base/xorg-server[xvfb]
+ net-misc/memcached
+ !dev-python/pytest-salt
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/pytest-services-2.0.1-no-mysql.patch"
+ "${FILESDIR}/pytest-services-2.0.1-lockdir.patch"
+)
+
+python_test() {
+ distutils_install_for_testing
+ pytest -vv tests || die "Tests failed under ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ find "${D}" -name '*.pth' -delete || die
+}