15
0

Accepting request 495671 from home:TheBlackCat:branches:devel:languages:python

- Implement single-spec version
- Fix source URL
- Update to version 2.1.2

OBS-URL: https://build.opensuse.org/request/show/495671
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imageio?expand=0&rev=2
This commit is contained in:
Todd R
2017-05-17 16:27:34 +00:00
committed by Git OBS Bridge
parent d6f3d49ec5
commit 05ab4cb884
4 changed files with 44 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-imageio
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@@ -16,55 +16,65 @@
#
# Tests don't work without internet
%bcond_with tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-imageio
Version: 1.4
Version: 2.1.2
Release: 0
Summary: 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://pypi.python.org/packages/source/i/imageio/imageio-%{version}.zip
Source: https://files.pythonhosted.org/packages/source/i/imageio/imageio-%{version}.zip
BuildRequires: ffmpeg
BuildRequires: libfreeimage3
BuildRequires: python-devel
BuildRequires: python-nose
BuildRequires: python-numpy
BuildRequires: python-pytest
BuildRequires: python-setuptools
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module numpy}
BuildRequires: unzip
%if %{with tests}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
%endif
Requires: ffmpeg
Requires: libfreeimage3
Requires: python-numpy
Recommends: libfreeimageplus3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
Imageio is a Python library that provides an easy interface to read and
write a wide range of image data, including animated images, volumetric
data, and scientific formats. It is cross-platform, runs on Python 2.x
and 3.x, and is easy to install.
data, and scientific formats.
%prep
%setup -q -n imageio-%{version}
%build
IMAGEIO_NO_INTERNET=1 python setup.py build
export IMAGEIO_NO_INTERNET=1
%python_build
%install
IMAGEIO_NO_INTERNET=1 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
export IMAGEIO_NO_INTERNET=1
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Tests don't work without internet
# %check
# pushd tests
# PYTHONPATH=%{buildroot}%{python_sitelib} py.test
# popd
%if %{with tests}
%check
pushd tests
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix}
}
popd
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc CONTRIBUTORS.txt LICENSE README.md
%{python_sitelib}/*