File python-imageio.spec of Package python-imageio
#
# spec file for package python-imageio
#
# Copyright (c) 2018 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Tests don't work without internet
%bcond_with tests
Name: python-imageio
Version: 2.3.0
Release: 0
Summary: Python library for reading and writing image, video, and related formats
License: BSD-2-Clause
Group: Development/Languages/Python
URL: http://imageio.github.io/
Source: https://files.pythonhosted.org/packages/source/i/imageio/imageio-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: ffmpeg
BuildRequires: libfreeimage3
BuildRequires: python-rpm-macros
Requires: ffmpeg
Requires: libfreeimage3
Requires: python-numpy
Recommends: libfreeimageplus3
BuildArch: noarch
%if %{with tests}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
%endif
%python_subpackages
%description
Imageio is a Python library that provides an interface to read and
write a wide range of image data, including animated images, volumetric
data, and scientific formats.
%prep
%setup -q -n imageio-%{version}
%build
export IMAGEIO_NO_INTERNET=1
%python_build
%install
export IMAGEIO_NO_INTERNET=1
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
pushd tests
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
popd
%endif
%files %{python_files}
%license LICENSE
%doc CONTRIBUTORS.txt README.md
%{python_sitelib}/*
%python3_only %{_bindir}/imageio_download_bin
%python3_only %{_bindir}/imageio_remove_bin
%changelog