- Switch to multibuild to avoid cycles

- Reduce the tests dependencies to match reality

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=5
This commit is contained in:
Tomáš Chvátal
2020-01-10 08:26:30 +00:00
committed by Git OBS Bridge
parent 52ae739e6d
commit 41a6e02d01
4 changed files with 33 additions and 18 deletions

3
_multibuild Normal file
View File

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

View File

@@ -1,3 +0,0 @@
<services>
<service name="download_files" mode="disabled" />
</services>

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 10 08:26:04 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild to avoid cycles
- Reduce the tests dependencies to match reality
-------------------------------------------------------------------
Wed Dec 19 16:06:15 UTC 2019 - Benjamin Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-astropy-header
#
# Copyright (c) 2019 SUSE LLC
# 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
@@ -18,7 +18,15 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-astropy-header
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-pytest-astropy-header%{psuffix}
Version: 0.1.2
Release: 0
Summary: Pytest plugin to add diagnostic information to the header of the test output
@@ -26,19 +34,15 @@ License: BSD-3-Clause
Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/pytest-astropy-header
Source: https://files.pythonhosted.org/packages/source/p/pytest-astropy-header/pytest-astropy-header-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest >= 2.8}
BuildRequires: %{python_module setuptools >= 30.3.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 2.8
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module astropy >= 3.0}
BuildRequires: %{python_module codecov}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module pytest-cov}
# /SECTION
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest >= 2.8}
%endif
%python_subpackages
%description
@@ -51,20 +55,25 @@ Astropy project, but is optimized for use with astropy-related projects.
%setup -q -n pytest-astropy-header-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE.rst
%{python_sitelib}/pytest_astropy_header
%{python_sitelib}/pytest_astropy_header-%{version}-py*.egg-info
%endif
%changelog