From 266c5c74b36142fd7ed83d8a6fe26c4b095c213af6ffb9b73836d4c71b6dfee8 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 22 Mar 2021 21:34:44 +0000 Subject: [PATCH] Accepting request 880603 from home:bnavigator:branches:devel:languages:python - Don't test requirementslib on python39. Isort calls it a "deprecated finder" anyway. Colorama needs to be pulled in seperately then. gh#sarugaku/requirementslib#288 OBS-URL: https://build.opensuse.org/request/show/880603 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=78 --- python-isort.changes | 7 +++++++ python-isort.spec | 22 ++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/python-isort.changes b/python-isort.changes index 6f78c7a..10367cc 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 22 21:09:24 UTC 2021 - Ben Greiner + +- Don't test requirementslib on python39. Isort calls it a + "deprecated finder" anyway. Colorama needs to be pulled in + seperately then. gh#sarugaku/requirementslib#288 + ------------------------------------------------------------------- Sun Mar 21 18:33:47 UTC 2021 - Ben Greiner diff --git a/python-isort.spec b/python-isort.spec index 55a9c73..733d4af 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -49,17 +49,18 @@ Suggests: git BuildArch: noarch %if %{with test} BuildRequires: %{python_module black} +BuildRequires: %{python_module colorama >= 0.4.3} BuildRequires: %{python_module hypothesis-auto} BuildRequires: %{python_module hypothesmith} BuildRequires: %{python_module libcst} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pip-api} BuildRequires: %{python_module pipreqs} BuildRequires: %{python_module poetry} BuildRequires: %{python_module pylama} BuildRequires: %{python_module pytest > 6.0} BuildRequires: %{python_module pytest-mock} -BuildRequires: %{python_module requirementslib >= 1.5} +# requirementslib not ready for python 3.9 yet -- gh#sarugaku/requirementslib#288 +BuildRequires: %{python_module requirementslib >= 1.5 if %python-base < 3.9} BuildRequires: git %endif %python_subpackages @@ -90,6 +91,15 @@ chmod -x LICENSE %if %{with test} %check +# test_projects_using_isort.py: these tests try to clone from online git repositories. +ignoretests="--ignore tests/integration/test_projects_using_isort.py" +# test_setting_combinations.py::test_isort_is_idempotent +# is flaky https://github.com/PyCQA/isort/issues/1466 +donttest="(test_setting_combinations and test_isort_is_idempotent)" +# requirementslib is not available yet for python39 +# https://github.com/sarugaku/requirementslib/issues/288 +python39_donttest=" or (test_deprecated_finders and test_pipfile_finder)" + ORIGPATH=$PATH %{python_expand # install isort and required example projects into custom root mkdir isort-test-%{$python_bin_suffix} @@ -110,15 +120,11 @@ for proj in build/isort-%{version}-py3-none-any.whl ./example_shared_isort_profi ${proj} done -# test_projects_using_isort.py: these tests try to clone from -# online git repositories. -# test_setting_combinations.py::test_isort_is_idempotent -# is flaky https://github.com/PyCQA/isort/issues/1466 pytest-%{$python_bin_suffix} -v \ -W "ignore::UserWarning" \ -W "ignore::DeprecationWarning" \ - --ignore tests/integration/test_projects_using_isort.py \ - -k "not (test_setting_combinations and test_isort_is_idempotent)" + ${ignoretests} \ + -k "not (${donttest} ${$python_donttest})" } %endif