From 8657ba1b186b1e740f515445f018b73f1e3e41e9d47877f17261b02cdc1d1228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 1 Mar 2019 14:47:56 +0000 Subject: [PATCH] - Switch to multibuild to avoid cycle with pylama OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=14 --- _multibuild | 3 +++ python-isort.changes | 5 +++++ python-isort.spec | 19 +++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-isort.changes b/python-isort.changes index ac5fbed..be43909 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 1 14:43:42 UTC 2019 - Tomáš Chvátal + +- Switch to multibuild to avoid cycle with pylama + ------------------------------------------------------------------- Thu Feb 28 06:07:17 UTC 2019 - John Vandenberg diff --git a/python-isort.spec b/python-isort.spec index b2d185a..377ae00 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -16,8 +16,15 @@ # -%{!?license: %global license %doc} %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif Name: python-isort Version: 4.3.9 Release: 0 @@ -26,9 +33,11 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/timothycrosley/isort Source: https://files.pythonhosted.org/packages/source/i/isort/isort-%{version}.tar.gz +%if %{with test} BuildRequires: %{python_module mock} BuildRequires: %{python_module pylama} BuildRequires: %{python_module pytest} +%endif BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -56,15 +65,21 @@ chmod -x LICENSE %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check -%python_exec setup.py test +%if %{with test} +%python_expand py.test-%{$python_bin_suffix} -v +%endif +%if !%{with test} %files %{python_files} %{python_sitelib}/isort* %python3_only %{_bindir}/isort %license LICENSE +%endif %changelog