From c0b33fda4deb81d3b0c7fd19925de5adb5c224193262553c20ff2884e6d95d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 9 Dec 2020 11:56:06 +0000 Subject: [PATCH] Accepting request 854218 from home:bnavigator:branches:devel:languages:python - Skip mypy test for flavors, which do not provide it (mypy is optional) OBS-URL: https://build.opensuse.org/request/show/854218 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylama?expand=0&rev=11 --- python-pylama.changes | 6 ++++++ python-pylama.spec | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pylama.changes b/python-pylama.changes index 40f3168..6739102 100644 --- a/python-pylama.changes +++ b/python-pylama.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 9 10:05:03 UTC 2020 - Benjamin Greiner + +- Skip mypy test for flavors, which do not provide it + (mypy is optional) + ------------------------------------------------------------------- Tue Sep 17 09:59:48 UTC 2019 - Tomáš Chvátal diff --git a/python-pylama.spec b/python-pylama.spec index 9e2f31b..52b0bb6 100644 --- a/python-pylama.spec +++ b/python-pylama.spec @@ -1,7 +1,7 @@ # # spec file for package python-pylama # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,6 +43,7 @@ BuildRequires: python-rpm-macros Requires: python-setuptools Requires(post): update-alternatives Requires(postun): update-alternatives +Recommends: mypy Recommends: python-mccabe >= 0.5.2 Recommends: python-pycodestyle >= 2.3.1 Recommends: python-pydocstyle >= 2.0.0 @@ -78,7 +79,9 @@ export LANG=en_US.UTF-8 %check export LANG=en_US.UTF-8 # test_ignore_select - relies on number of errors reported by pyflakes/etc. -%pytest -k 'not test_ignore_select' +# mypy as module is only available for default python3 provider +%python_exec -c 'import mypy' || $python_skiptest+=" or test_mypy" +%pytest -k "not (test_ignore_select ${$python_skiptest})" %post %python_install_alternative pylama @@ -90,6 +93,7 @@ export LANG=en_US.UTF-8 %doc AUTHORS Changelog README.rst %license LICENSE %python_alternative %{_bindir}/pylama -%{python_sitelib}/* +%{python_sitelib}/pylama +%{python_sitelib}/pylama-%{version}*-info %changelog