Accepting request 813481 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/813481 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-extras?expand=0&rev=14
This commit is contained in:
commit
1ea88e0f87
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 10 09:07:14 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- replace nose
|
||||
- enable testing by default with multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 13:37:36 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-extras
|
||||
#
|
||||
# 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
|
||||
@ -17,10 +17,16 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
# A build cycle exists between python-extras and python-testtools. Thus, only
|
||||
# enable testing with a build conditional (off by default):
|
||||
%bcond_with tests
|
||||
Name: python-extras
|
||||
# A build cycle exists between python-extras and python-testtools.
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-extras%{psuffix}
|
||||
Version: 1.0.0
|
||||
Release: 0
|
||||
Summary: Extra bits for Python
|
||||
@ -34,8 +40,7 @@ BuildRequires: python-rpm-macros
|
||||
#!BuildIgnore: python-extras
|
||||
BuildArch: noarch
|
||||
# Test requirements:
|
||||
%if %{with tests}
|
||||
BuildRequires: %{python_module nose}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module testtools}
|
||||
%endif
|
||||
%python_subpackages
|
||||
@ -52,18 +57,22 @@ general use outside of a testing context.
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%python_exec %{_bindir}/nosetests
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_exec -m unittest discover
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc NEWS README.rst
|
||||
%{python_sitelib}/extras
|
||||
%{python_sitelib}/extras-%{version}-py%{python_version}.egg-info/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user