15
0
Files
python-imageio/python-imageio.spec
Markéta Machová 5480817419 Accepting request 1006804 from home:yarunachalam:branches:devel:languages:python
- Update to 2.22.0 
  Feature
  * Pyav API for procedural video writing (#853) (acbcb64)
- Update to v2.21.3
  Fix
  * Raise error if fps is specified (#871) (1f8d37a)
  Other
  * Fix small typo (#873) (f59e16d)
  * Examples for Pyav (#865) (810a7a9)
- Update to v2.21.2
  Fix
  * Allow v3.imread to read dicom (#868) (22c98c2)
  Revert to asanyarray (#863) (fdaba04)
  Other
  Add missing numpy import in example (#866) (d85bfba)
- Update to v2.21.1
  Fix
  Seeking to last frame caused EoF in pyav (#855) (7ff7f02)
- Update to v2.21.0
  Fix
  Write single TIFF page for single RGB image (#851) (0f04bc9)
  Feature
  Add is_batch kwarg to pillow (#845) (21d5c73)
  Other
  Add a migration note about pillow squeezing (#850) (7c55a55)
  Add missin option to imwrite type hints (#848) (6da4a42)
  Ignore exclude_applied on legacy plugins (#844) (f082dde)
  Remove unneeded CD steps (#847) (0d99c51)
- Update to v2.20.0
  Fix

OBS-URL: https://build.opensuse.org/request/show/1006804
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imageio?expand=0&rev=25
2022-09-29 09:19:56 +00:00

118 lines
3.7 KiB
RPMSpec

#
# spec file for package python-imageio
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%bcond_with test_extras
Name: python-imageio
Version: 2.21.2
Release: 0
Summary: Python library for reading and writing image, video, and related formats
License: BSD-2-Clause
URL: https://imageio.github.io/
Source0: https://files.pythonhosted.org/packages/source/i/imageio/imageio-%{version}.tar.gz
Source1: python-imageio-rpmlintrc
BuildRequires: %{python_module Pillow >= 8.3.2}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module numpy >= 1.20.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Pillow >= 8.3.2
Requires: python-numpy >= 1.20.0
Recommends: python-imageio-ffmpeg
Suggests: python-astropy
Suggests: python-tifffile
# not in openSUSE (yet)
Suggests: python-simpleitk
# alternative is not singlespec
Suggests: python3-itk
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
# GDAL is not (yet) singlespec
Suggests: python3-GDAL
%endif
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: libfreeimageplus3
# SECTION test requirements
BuildRequires: %{python_module fsspec}
BuildRequires: %{python_module pytest}
BuildRequires: libglvnd-devel
%if %{with test_extras}
BuildRequires: %{python_module astropy}
BuildRequires: %{python_module imageio-ffmpeg}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module tifffile}
BuildRequires: python3-GDAL
# python3-itk does not work on 32-bit, don't bother testing that
%endif
# /SECTION
BuildArch: noarch
%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}
# Plugins are not executable scripts
for plgpy in imageio/plugins/_*.py ; do
echo "Fixing $plgpy..."
sed -i -e '1{/\/usr\/bin.*python/d}' $plgpy
done
%build
export IMAGEIO_NO_INTERNET=1
%python_build
%install
export IMAGEIO_NO_INTERNET=1
%python_install
%python_clone -a %{buildroot}%{_bindir}/imageio_remove_bin
%python_clone -a %{buildroot}%{_bindir}/imageio_download_bin
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export IMAGEIO_NO_INTERNET=1
# plain openSUSE does not have the right codecs to test this ffmpeg
donttest="test_ffmpeg"
# unmarked online tests
donttest="$donttest or test_freeimage"
%pytest -ra -k "not ($donttest)" -m "not needs_internet"
%post
%python_install_alternative imageio_remove_bin
%python_install_alternative imageio_download_bin
%postun
%python_uninstall_alternative imageio_remove_bin
%python_uninstall_alternative imageio_download_bin
%files %{python_files}
%license LICENSE
%doc CONTRIBUTORS.txt README.md
%{python_sitelib}/imageio
%{python_sitelib}/imageio-%{version}*-info
%python_alternative %{_bindir}/imageio_download_bin
%python_alternative %{_bindir}/imageio_remove_bin
%changelog