- split tests into flavor to avoid build cycle with djang
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-semantic_version?expand=0&rev=15
This commit is contained in:
parent
a3a7f65e1d
commit
6e82465922
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 6 07:58:52 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- split tests into flavor to avoid build cycle with djang
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 29 13:46:19 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-semantic_version
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,6 +17,14 @@
|
||||
|
||||
|
||||
%{?!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-semantic_version
|
||||
Version: 2.8.5
|
||||
Release: 0
|
||||
@ -25,8 +33,10 @@ License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/rbarrois/python-semanticversion
|
||||
Source: https://files.pythonhosted.org/packages/source/s/semantic_version/semantic_version-%{version}.tar.gz
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module Django >= 1.11}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -44,15 +54,21 @@ It follows strictly the 2.0.0 version of the SemVer scheme.
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%else
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst ChangeLog
|
||||
%{python_sitelib}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user