33a2093
%global srcname pytest-arraydiff
33a2093
%global sum The py.test arraydiff plugin
33a2093
33a2093
Name:           python-%{srcname}
33a2093
Version:        0.2
f611bd3
Release:        2%{?dist}
33a2093
Summary:        %{sum}
33a2093
33a2093
License:        BSD
33a2093
URL:            https://pypi.python.org/pypi/%{srcname}
33a2093
Source0:        https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
33a2093
33a2093
BuildArch:      noarch
33a2093
BuildRequires:  python3-devel
33a2093
BuildRequires:  python3-numpy
33a2093
BuildRequires:  python3-pytest
33a2093
BuildRequires:  python3-setuptools
33a2093
BuildRequires:  python3-six
33a2093
33a2093
%description
33a2093
This is a py.test plugin to facilitate the generation and comparison of
33a2093
data arrays produced during tests.
33a2093
33a2093
The basic idea is that you can write a test that generates a Numpy array
33a2093
(or other related objects depending on the format). You can then either
33a2093
run the tests in a mode to generate reference files from the arrays, or
33a2093
you can run the tests in comparison mode, which will compare the results
33a2093
of the tests to the reference ones within some tolerance.
33a2093
33a2093
At the moment, the supported file formats for the reference files are:
33a2093
* A plain text-based format (baed on Numpy loadtxt output)
33a2093
* The FITS format (requires astropy). With this format, tests can return
33a2093
  either a Numpy array for a FITS HDU object.
33a2093
33a2093
33a2093
33a2093
%package -n python3-%{srcname}
33a2093
Summary:        %{sum}
33a2093
Requires:       python3-numpy
33a2093
Requires:       python3-pytest
33a2093
Requires:       python3-six
33a2093
%{?python_provide:%python_provide python3-%{srcname}}
33a2093
33a2093
%description -n python3-%{srcname}
33a2093
This is a py.test plugin to facilitate the generation and comparison of
33a2093
data arrays produced during tests.
33a2093
33a2093
The basic idea is that you can write a test that generates a Numpy array
33a2093
(or other related objects depending on the format). You can then either
33a2093
run the tests in a mode to generate reference files from the arrays, or
33a2093
you can run the tests in comparison mode, which will compare the results
33a2093
of the tests to the reference ones within some tolerance.
33a2093
33a2093
At the moment, the supported file formats for the reference files are:
33a2093
* A plain text-based format (baed on Numpy loadtxt output)
33a2093
* The FITS format (requires astropy). With this format, tests can return
33a2093
  either a Numpy array for a FITS HDU object.
33a2093
33a2093
33a2093
%prep
33a2093
%autosetup -n %{srcname}-%{version}
33a2093
33a2093
%build
33a2093
%py3_build
33a2093
33a2093
%install
33a2093
%py3_install
33a2093
33a2093
# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
33a2093
%files -n python3-%{srcname}
33a2093
%license LICENSE
33a2093
%doc CHANGES.md README.rst
33a2093
%{python3_sitelib}/*
33a2093
33a2093
%changelog
f611bd3
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 0.2-2
f611bd3
- Rebuilt for Python 3.7
f611bd3
33a2093
* Sat Mar 17 2018 Christian Dersch <lupinix@mailbox.org> - 0.2-1
33a2093
- initial packaging effort
33a2093