From ba935da77b4fc0144291270a9c46b1da12215de79a089b7a40dbb74bdb63f979 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 27 Apr 2021 11:17:51 +0000 Subject: [PATCH] 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 --- python-pytest-arraydiff.changes | 7 +++++++ python-pytest-arraydiff.spec | 21 ++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/python-pytest-arraydiff.changes b/python-pytest-arraydiff.changes index 7a71922..0b548ea 100644 --- a/python-pytest-arraydiff.changes +++ b/python-pytest-arraydiff.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 27 09:52:52 UTC 2021 - Ben Greiner + +- 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 diff --git a/python-pytest-arraydiff.spec b/python-pytest-arraydiff.spec index f587f4f..6c08749 100644 --- a/python-pytest-arraydiff.spec +++ b/python-pytest-arraydiff.spec @@ -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