SHA256
1
0
forked from pool/python-isort

- 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
This commit is contained in:
Tomáš Chvátal 2019-03-01 14:47:56 +00:00 committed by Git OBS Bridge
parent c4c28e3a4c
commit 8657ba1b18
3 changed files with 25 additions and 2 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Mar 1 14:43:42 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild to avoid cycle with pylama
-------------------------------------------------------------------
Thu Feb 28 06:07:17 UTC 2019 - John Vandenberg <jayvdb@gmail.com>

View File

@ -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