diff options
-rw-r--r-- | www-servers/gunicorn/files/gunicorn-20.1.0-tests_optional_modules.patch | 22 | ||||
-rw-r--r-- | www-servers/gunicorn/gunicorn-20.1.0.ebuild | 8 |
2 files changed, 26 insertions, 4 deletions
diff --git a/www-servers/gunicorn/files/gunicorn-20.1.0-tests_optional_modules.patch b/www-servers/gunicorn/files/gunicorn-20.1.0-tests_optional_modules.patch new file mode 100644 index 000000000000..d04c300c2076 --- /dev/null +++ b/www-servers/gunicorn/files/gunicorn-20.1.0-tests_optional_modules.patch @@ -0,0 +1,22 @@ +--- a/tests/workers/test_geventlet.py ++++ b/tests/workers/test_geventlet.py +@@ -3,5 +3,8 @@ + # This file is part of gunicorn released under the MIT license. + # See the NOTICE for more information. + ++import pytest ++pytest.importorskip('eventlet') ++ + def test_import(): + __import__('gunicorn.workers.geventlet') +--- a/tests/workers/test_ggevent.py ++++ b/tests/workers/test_ggevent.py +@@ -3,5 +3,8 @@ + # This file is part of gunicorn released under the MIT license. + # See the NOTICE for more information. + ++import pytest ++pytest.importorskip('gevent') ++ + def test_import(): + __import__('gunicorn.workers.ggevent') diff --git a/www-servers/gunicorn/gunicorn-20.1.0.ebuild b/www-servers/gunicorn/gunicorn-20.1.0.ebuild index 7905e095b6ea..cb38379151a0 100644 --- a/www-servers/gunicorn/gunicorn-20.1.0.ebuild +++ b/www-servers/gunicorn/gunicorn-20.1.0.ebuild @@ -19,17 +19,17 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-mac RDEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]" +PATCHES=( + "${FILESDIR}"/${PN}-20.1.0-tests_optional_modules.patch +) + DOCS=( README.rst ) distutils_enable_sphinx 'docs/source' --no-autodoc distutils_enable_tests pytest src_prepare() { - # These fail if respective optional packages have not been installed - rm -f tests/workers/test_g{eventlet,gevent}.py - sed -e 's:--cov=gunicorn --cov-report=xml::' -i setup.cfg || die - distutils-r1_src_prepare } |