From 857e5d3d8de03efda3cb429bffdf671e2317ae5c5ca224f3097760af05549c5f Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 23 Jan 2024 07:17:16 +0000 Subject: [PATCH] Accepting request 1140766 from home:alarrosa:branches:devel:languages:python - Disable pylama tests in SLE since pylama adds too many dependencies. OBS-URL: https://build.opensuse.org/request/show/1140766 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=113 --- python-isort.changes | 6 ++++++ python-isort.spec | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/python-isort.changes b/python-isort.changes index f54b4b8..476c0bc 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 15 17:50:47 UTC 2024 - Antonio Larrosa + +- Disable pylama tests in SLE since pylama adds too many + dependencies. + ------------------------------------------------------------------- Sun Dec 17 02:10:01 UTC 2023 - Dirk Müller diff --git a/python-isort.spec b/python-isort.spec index 9a831b3..9a535d6 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,12 @@ %bcond_with test %endif +%if 0%{?suse_version} < 1550 +%bcond_with pylama +%else +%bcond_without pylama +%endif + %{?sle15_python_module_pythons} Name: python-isort%{psuffix} Version: 5.13.2 @@ -58,7 +64,9 @@ BuildRequires: %{python_module numpy} BuildRequires: %{python_module pip-api} BuildRequires: %{python_module pipreqs} BuildRequires: %{python_module poetry} +%if %{with pylama} BuildRequires: %{python_module pylama} +%endif BuildRequires: %{python_module pytest > 6.0} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module toml >= 0.10.2} @@ -79,6 +87,10 @@ too. %setup -q -n isort-%{version} chmod -x LICENSE +%if %{without pylama} +sed -i '/import isort.pylama_isort/d' tests/unit/test_importable.py +%endif + echo " # increase test deadline for slow obs executions import hypothesis @@ -107,6 +119,9 @@ hypothesis.settings.register_profile( ignoretests="--ignore tests/integration/test_projects_using_isort.py" # don't run benchmarks ignoretests+=" --ignore tests/benchmark" +%if %{without pylama} +ignoretests+=" --ignore tests/unit/test_pylama_isort.py" +%endif # 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)"