- 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> 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 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,15 @@
%define skip_python2 1 %define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!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 Version: 0.1.2
Release: 0 Release: 0
Summary: Pytest plugin to add diagnostic information to the header of the test output Summary: Pytest plugin to add diagnostic information to the header of the test output
@@ -26,45 +34,46 @@ License: BSD-3-Clause
Group: Productivity/Scientific/Astronomy Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/pytest-astropy-header 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 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 >= 30.3.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest >= 2.8}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-pytest >= 2.8 Requires: python-pytest >= 2.8
# SECTION test requirements %if %{with test}
BuildRequires: %{python_module astropy >= 3.0} BuildRequires: %{python_module astropy >= 3.0}
BuildRequires: %{python_module codecov} BuildRequires: %{python_module numpy}
BuildRequires: %{python_module coverage} BuildRequires: %{python_module pytest >= 2.8}
BuildRequires: %{python_module numpy-devel} %endif
BuildRequires: %{python_module pytest-cov}
# /SECTION
%python_subpackages %python_subpackages
%description %description
This plugin package provides a way to include information about the system, This plugin package provides a way to include information about the system,
Python installation, and select dependencies in the header of the output when Python installation, and select dependencies in the header of the output when
running pytest. It can be used with packages that are not affiliated with the running pytest. It can be used with packages that are not affiliated with the
Astropy project, but is optimized for use with astropy-related projects. Astropy project, but is optimized for use with astropy-related projects.
%prep %prep
%setup -q -n pytest-astropy-header-%{version} %setup -q -n pytest-astropy-header-%{version}
%build %build
export CFLAGS="%{optflags}"
%python_build %python_build
%install %install
%if !%{with test}
%python_install %python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check %check
%if %{with test}
%pytest %pytest
%endif
%if !%{with test}
%files %{python_files} %files %{python_files}
%doc CHANGES.rst README.rst %doc CHANGES.rst README.rst
%license LICENSE.rst %license LICENSE.rst
%{python_sitelib}/pytest_astropy_header %{python_sitelib}/pytest_astropy_header
%{python_sitelib}/pytest_astropy_header-%{version}-py*.egg-info %{python_sitelib}/pytest_astropy_header-%{version}-py*.egg-info
%endif
%changelog %changelog