Accepting request 854212 from home:bnavigator:branches:openSUSE:Factory:Staging:N

- Fix test failures
  * requires astropy >= 4 which removed astropy-helpers 
  * gh#/astropy/pytest-astropy-header#16
    pytest-astropy-header-pr16-no-helper-version.patch
  * gh#/astropy/pytest-astropy-header#29
    pytest-astropy-header-pr29-nohelpers.patch

OBS-URL: https://build.opensuse.org/request/show/854212
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=9
This commit is contained in:
2020-12-09 10:04:43 +00:00
committed by Git OBS Bridge
parent 7f509c29a6
commit d56098be5a
4 changed files with 238 additions and 2 deletions

View File

@@ -22,6 +22,8 @@
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
# current astropy in TW requires python >= 3.7
%define skip_python36 1
%bcond_without test
%else
%define psuffix %{nil}
@@ -35,12 +37,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/%{modname}/%{modname}-%{version}.tar.gz
Patch0: https://github.com/astropy/pytest-astropy-header/pull/16.patch#/pytest-astropy-header-pr16-no-helper-version.patch
Patch1: https://github.com/astropy/pytest-astropy-header/pull/29.patch#/pytest-astropy-header-pr29-nohelpers.patch
BuildRequires: %{python_module setuptools >= 30.3.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 2.8
%if %{with test}
BuildRequires: %{python_module astropy >= 3.0}
# Patch0 and Patch1: helpers got removed in astropy 4
BuildRequires: %{python_module astropy >= 4.0}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest >= 2.8}
%endif
@@ -53,7 +58,7 @@ 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.
%prep
%setup -q -n %{modname}-%{version}
%autosetup -p1 -n %{modname}-%{version}
%build
%python_build