forked from pool/python-pytest-arraydiff
Accepting request 888738 from home:bnavigator:branches:devel:languages:python:pytest
- Do not build the package for python36 either (installcheck failure, numpy is a runtime requirement) - Test astropy functionality for python3 OBS-URL: https://build.opensuse.org/request/show/888738 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-arraydiff?expand=0&rev=10
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 27 09:52:52 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Do not build the package for python36 either
|
||||
(installcheck failure, numpy is a runtime requirement)
|
||||
- Test astropy functionality for python3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 19 05:19:34 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@@ -16,22 +16,23 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%define skip_python36 1
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python36 1
|
||||
Name: python-pytest-arraydiff%{psuffix}
|
||||
Version: 0.3
|
||||
Release: 0
|
||||
Summary: Pytest plugin to help with comparing array output from tests
|
||||
License: BSD-2-Clause
|
||||
URL: https://github.com/astrofrog/pytest-arraydiff
|
||||
URL: https://github.com/astropy/pytest-arraydiff
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-arraydiff/pytest-arraydiff-%{version}.tar.gz
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -41,6 +42,7 @@ Requires: python-pytest
|
||||
Requires: python-six
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module astropy if %python-base > 3}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module six}
|
||||
@@ -77,15 +79,24 @@ At the moment, the supported file formats for the reference files are:
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%{python_expand # u-a controlled pytest executable for nested pytest calls within tests
|
||||
mkdir -p build/bin
|
||||
ln -sf %{_bindir}/pytest-%{$python_bin_suffix} build/bin/pytest
|
||||
}
|
||||
export PATH="$PWD/build/bin:$PATH"
|
||||
# not installed in :test multiflavor
|
||||
export PYTHONPATH="$PWD"
|
||||
# generate, default_format, test_fails, test_succeeds_func_fits_hdu tests need astropy that is python3 only, so skip
|
||||
%pytest -k 'not (test_generate or test_default_format or test_fails or test_succeeds_func_fits_hdu)'
|
||||
python2_donttest=" or test_generate or test_default_format or test_fails or test_succeeds_func_fits_hdu"
|
||||
%pytest -k "not (donttestdummyprefix ${$python_donttest})"
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%doc CHANGES.md README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/pytest_arraydiff
|
||||
%{python_sitelib}/pytest_arraydiff-%{version}*-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user