forked from pool/python-pytest-arraydiff
		
	Accepting request 888760 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/888760 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-arraydiff?expand=0&rev=3
This commit is contained in:
		| @@ -1,3 +1,15 @@ | ||||
| ------------------------------------------------------------------- | ||||
| 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> | ||||
|  | ||||
| - Do not build :test on Python 3.6, due to no NumPy.  | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Wed Feb 13 13:19:01 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| # | ||||
| # spec file for package python-pytest-arraydiff | ||||
| # spec file for package python-pytest-arraydiff-test | ||||
| # | ||||
| # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. | ||||
| # Copyright (c) 2021 SUSE LLC | ||||
| # | ||||
| # All modifications and additions to the file contributed by third parties | ||||
| # remain the property of their copyright owners, unless otherwise agreed | ||||
| @@ -16,7 +16,6 @@ | ||||
| # | ||||
|  | ||||
|  | ||||
| %{?!python_module:%define python_module() python-%{**} python3-%{**}} | ||||
| %global flavor @BUILD_FLAVOR@%{nil} | ||||
| %if "%{flavor}" == "test" | ||||
| %define psuffix -test | ||||
| @@ -25,13 +24,15 @@ | ||||
| %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 | ||||
| Group:          Development/Languages/Python | ||||
| 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