From 8064fd394bf3adf1209977d4f6b66e28589ef0776c871c5cfec5538b1696e7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 13 Feb 2019 13:27:45 +0000 Subject: [PATCH] - Update to 0.3: * Fixed compatibility with pytest 4+. [#15] - Use _multibuild to run tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-arraydiff?expand=0&rev=5 --- _multibuild | 3 +++ pytest-arraydiff-0.2.tar.gz | 3 --- pytest-arraydiff-0.3.tar.gz | 3 +++ python-pytest-arraydiff.changes | 7 ++++++ python-pytest-arraydiff.spec | 40 ++++++++++++++++++++++++--------- 5 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 _multibuild delete mode 100644 pytest-arraydiff-0.2.tar.gz create mode 100644 pytest-arraydiff-0.3.tar.gz diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/pytest-arraydiff-0.2.tar.gz b/pytest-arraydiff-0.2.tar.gz deleted file mode 100644 index 2bbc663..0000000 --- a/pytest-arraydiff-0.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0145edfa8830aba07150fc09443da74d0ec4074e3de702445453415a744d3ad9 -size 12838 diff --git a/pytest-arraydiff-0.3.tar.gz b/pytest-arraydiff-0.3.tar.gz new file mode 100644 index 0000000..1eec6eb --- /dev/null +++ b/pytest-arraydiff-0.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de2d62f53ecc107ed754d70d562adfa7573677a263216a7f19aa332f20dc6c15 +size 11167 diff --git a/python-pytest-arraydiff.changes b/python-pytest-arraydiff.changes index cb6b485..528efed 100644 --- a/python-pytest-arraydiff.changes +++ b/python-pytest-arraydiff.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 13 13:19:01 UTC 2019 - Tomáš Chvátal + +- Update to 0.3: + * Fixed compatibility with pytest 4+. [#15] +- Use _multibuild to run tests + ------------------------------------------------------------------- Tue Aug 14 20:03:10 UTC 2018 - toddrme2178@gmail.com diff --git a/python-pytest-arraydiff.spec b/python-pytest-arraydiff.spec index f7c9ea2..19aaf19 100644 --- a/python-pytest-arraydiff.spec +++ b/python-pytest-arraydiff.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-arraydiff # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,20 +12,27 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# -# Tests require astropy, which in turn requires this package %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-pytest-arraydiff -Version: 0.2 +%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-arraydiff%{psuffix} +Version: 0.3 Release: 0 -License: BSD-2-Clause Summary: Pytest plugin to help with comparing array output from tests -Url: https://github.com/astrofrog/pytest-arraydiff +License: BSD-2-Clause Group: Development/Languages/Python +URL: https://github.com/astrofrog/pytest-arraydiff Source: https://files.pythonhosted.org/packages/source/p/pytest-arraydiff/pytest-arraydiff-%{version}.tar.gz -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -33,7 +40,12 @@ Requires: python-numpy Requires: python-pytest Requires: python-six BuildArch: noarch - +%if %{with test} +BuildRequires: %{python_module astorpy} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module six} +%endif %python_subpackages %description @@ -52,7 +64,6 @@ At the moment, the supported file formats for the reference files are: - The FITS format (requires astropy). With this format, tests can return either a Numpy array for a FITS HDU object. - %prep %setup -q -n pytest-arraydiff-%{version} @@ -60,12 +71,21 @@ At the moment, the supported file formats for the reference files are: %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v +%endif + +%if !%{with test} %files %{python_files} %doc CHANGES.md README.rst %license LICENSE %{python_sitelib}/* +%endif %changelog