15
0

- Switch to multibuild to avoid build cycle

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-incremental?expand=0&rev=7
This commit is contained in:
Tomáš Chvátal
2019-06-06 15:39:43 +00:00
committed by Git OBS Bridge
parent 647c006714
commit db535937e6
3 changed files with 25 additions and 3 deletions

View File

@@ -17,7 +17,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-incremental
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-incremental%{psuffix}
Version: 17.5.0
Release: 0
Summary: Library that versions your Python projects
@@ -31,11 +39,11 @@ BuildRequires: python-rpm-macros
Suggests: %{python_module Twisted >= 16.4.0}
Suggests: %{python_module click >= 6.0}
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module Twisted >= 16.4.0}
BuildRequires: %{python_module click >= 6.0}
BuildRequires: %{python_module pytest}
# /SECTION
%endif
%python_subpackages
%description
@@ -48,15 +56,21 @@ Incremental is a small library that versions your Python projects.
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%pytest
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc NEWS.rst README.rst
%{python_sitelib}/*
%endif
%changelog