diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-python/pytest-services | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-python/pytest-services')
5 files changed, 110 insertions, 0 deletions
diff --git a/dev-python/pytest-services/Manifest b/dev-python/pytest-services/Manifest new file mode 100644 index 000000000000..4f1855f69589 --- /dev/null +++ b/dev-python/pytest-services/Manifest @@ -0,0 +1,5 @@ +AUX pytest-services-2.0.1-lockdir.patch 1085 BLAKE2B 09982cf4874d82a332b441e4538d1fb177735af3acb2ba2d7fed9c0a2ef006841ca0c4221fc51c0472a0a94c49bbcb72877c67b5c7630333f550e3fda1b5aa91 SHA512 7b5d4d5adb722936bd3593ed4e12fa2ca9bc3aa764565d9cbbea2d70424d9811d5838e97bbbe8fafa2f73acb8bdfa6c705e8c4aec12b5b6556b1e4c8db629ea9 +AUX pytest-services-2.0.1-no-mysql.patch 821 BLAKE2B 3a041e51c0e2c08ce8727eccdbfac36eacec2542d8d8cc7ab7544f46916b47a62e960437821f8fa85fe968b9e68808b94d9ac51fe06daf487008bfaf305ba81e SHA512 68788f6b6700793df2de4fbae85a41fad095f09ac9af717c786305fc1ca6b29438a65d096076b9469dc543a54ce8f72a40dc0f211eb9d517e658ce068e60ee23 +DIST pytest-services-2.0.1.tar.gz 20386 BLAKE2B 5ec94fdd0fbc5990216fcbae112973fa8b41902a6fa666dd4c5dee2422f76e128ce3a576ec93ecb86bddff5f6bca0e1afaf791583bd275b2543d0e780e45014b SHA512 445cd5346f0c19b68014eb3c27b06376ae6699e31d8c1fee0cb3cda6e927d0ecadbffe3b0b832dd38fe63bc1fe4e3108e2ecbcabf0641af0bdbff019681f0576 +EBUILD pytest-services-2.0.1.ebuild 1180 BLAKE2B 5829467f8c39f5108bcf79eefa013c3e6289808d17f1f95e8432e7009f9de6615b80659d37f41241e49787dfe082f943ec5c1d98e983db337871f49af54f0e2e SHA512 08d8f0e34710b6262eaa0867cfe2a9d9298737e214709a24423446a6d6b4102c0d145010dc53ff0a42cf4b35716e6c74e9555d17204b83fa01a44ebc94750a0b +MISC metadata.xml 384 BLAKE2B 3b55101f9c900a8570344ac9335687f3c505f5055022af866fe090878b2b44222a311d3166103e16be780d28a84d9142416acf2933be1a01712587910f7c5d77 SHA512 b18e80dac13f712ff61216f2b23f7c33fea7508634ad523b67f232fcb8301000edff1ca92307834878b6392ea38be8f03118abd2dc55ff6b9c03c8c4dd342e4d 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..e3205b37b69e --- /dev/null +++ b/dev-python/pytest-services/metadata.xml @@ -0,0 +1,12 @@ +<?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> +</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..a6c14c4348ab --- /dev/null +++ b/dev-python/pytest-services/pytest-services-2.0.1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_{6,7}} ) +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="~amd64" +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="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pylibmc[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/subprocess32[${PYTHON_USEDEP}]' -2) + )" + +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 +} |