From 9b0c40f6d282628e0e153d20b1f594e79d3f0cb8d1212c9f9b9ddb93a848a573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 23 Jun 2020 16:44:57 +0000 Subject: [PATCH] Accepting request 816623 from home:bnavigator:branches:devel:languages:python - use local source dir for pytest imports gh#openSUSE/python-rpm-macros#48 OBS-URL: https://build.opensuse.org/request/show/816623 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=197 --- python-setuptools.changes | 6 ++++++ python-setuptools.spec | 2 ++ 2 files changed, 8 insertions(+) diff --git a/python-setuptools.changes b/python-setuptools.changes index 852ba76..016f427 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 23 15:41:14 UTC 2020 - Benjamin Greiner + +- use local source dir for pytest imports + gh#openSUSE/python-rpm-macros#48 + ------------------------------------------------------------------- Mon Apr 6 17:14:11 UTC 2020 - Matej Cepl diff --git a/python-setuptools.spec b/python-setuptools.spec index f52f61c..d41f6eb 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -135,6 +135,8 @@ find ./ -type f -name \*.py -exec sed -i \ # the 4 skipped test rely on the bundled packages but they are # not available on virtualenv; this is expected behaviour export LANG=en_US.UTF-8 +# tests need imports local source dir +export PYTHONPATH=$(pwd) %pytest -k 'not (test_clean_env_install or test_pip_upgrade_from_source or test_test_command_install_requirements or test_no_missing_dependencies)' %endif