forked from pool/python-imagecodecs
- Add patch to enforce cythonization:
* always-cythonize.patch - Add patch to locate zopfli headers properly: * zopfli-headers.patch - Update to 2020.5.30: * pythhon3 only * add support for more codecs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=9
This commit is contained in:
parent
1daf82d201
commit
c232204244
13
always-cythonize.patch
Normal file
13
always-cythonize.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: imagecodecs-2020.5.30/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- imagecodecs-2020.5.30.orig/setup.py
|
||||||
|
+++ imagecodecs-2020.5.30/setup.py
|
||||||
|
@@ -71,7 +71,7 @@ if 'sdist' in sys.argv:
|
||||||
|
|
||||||
|
|
||||||
|
OPTIONS = {
|
||||||
|
- 'cythonize': sys.version_info >= (3, 10),
|
||||||
|
+ 'cythonize': True,
|
||||||
|
'include_dirs': ['imagecodecs'],
|
||||||
|
'library_dirs': [],
|
||||||
|
'libraries': ['m'] if sys.platform != 'win32' else [],
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7cd689549b41dc979fed1a26e668a080e67b276b029d179ae3a9eb27a0187719
|
|
||||||
size 6487114
|
|
3
imagecodecs-2020.5.30.tar.gz
Normal file
3
imagecodecs-2020.5.30.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c8c776922d3a60824d8d3d31ba674a250d1b4d429e81349b5c88c34d4353ddb5
|
||||||
|
size 8993252
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 28 08:37:24 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to enforce cythonization:
|
||||||
|
* always-cythonize.patch
|
||||||
|
- Add patch to locate zopfli headers properly:
|
||||||
|
* zopfli-headers.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 28 08:20:58 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 2020.5.30:
|
||||||
|
* pythhon3 only
|
||||||
|
* add support for more codecs
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 25 10:59:24 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
Mon May 25 10:59:24 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||||
|
|
||||||
|
@ -19,47 +19,56 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-imagecodecs
|
Name: python-imagecodecs
|
||||||
Version: 2019.5.22
|
Version: 2020.5.30
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Image transformation, compression, and decompression codecs
|
Summary: Image transformation, compression, and decompression codecs
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://www.lfd.uci.edu/~gohlke/
|
URL: https://www.lfd.uci.edu/~gohlke/
|
||||||
Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/imagecodecs-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module Cython}
|
Patch0: always-cythonize.patch
|
||||||
|
Patch1: zopfli-headers.patch
|
||||||
|
BuildRequires: %{python_module Cython >= 0.29.19}
|
||||||
BuildRequires: %{python_module Pillow}
|
BuildRequires: %{python_module Pillow}
|
||||||
BuildRequires: %{python_module blosc}
|
BuildRequires: %{python_module blosc}
|
||||||
BuildRequires: %{python_module lz4}
|
BuildRequires: %{python_module lz4}
|
||||||
BuildRequires: %{python_module matplotlib >= 2.2}
|
BuildRequires: %{python_module matplotlib >= 2.2}
|
||||||
BuildRequires: %{python_module numpy-devel >= 1.11.3}
|
BuildRequires: %{python_module numpy-devel >= 1.15.1}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module scikit-image}
|
BuildRequires: %{python_module scikit-image}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools >= 18.0}
|
||||||
|
BuildRequires: %{python_module tifffile >= 2020.5.25}
|
||||||
BuildRequires: %{python_module zstd}
|
BuildRequires: %{python_module zstd}
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: giflib-devel
|
||||||
BuildRequires: jxrlib-devel
|
BuildRequires: jxrlib-devel
|
||||||
BuildRequires: libjpeg62-devel
|
BuildRequires: libaec-devel
|
||||||
|
BuildRequires: libzopfli-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: snappy-devel
|
||||||
BuildRequires: pkgconfig(blosc)
|
BuildRequires: pkgconfig(blosc)
|
||||||
BuildRequires: pkgconfig(bzip2)
|
BuildRequires: pkgconfig(bzip2)
|
||||||
BuildRequires: pkgconfig(lcms2)
|
BuildRequires: pkgconfig(lcms2)
|
||||||
|
BuildRequires: pkgconfig(libbrotlicommon)
|
||||||
|
BuildRequires: pkgconfig(libjpeg)
|
||||||
BuildRequires: pkgconfig(liblz4)
|
BuildRequires: pkgconfig(liblz4)
|
||||||
BuildRequires: pkgconfig(liblzma)
|
BuildRequires: pkgconfig(liblzma)
|
||||||
BuildRequires: pkgconfig(libopenjp2)
|
BuildRequires: pkgconfig(libopenjp2)
|
||||||
BuildRequires: pkgconfig(libpng)
|
BuildRequires: pkgconfig(libpng)
|
||||||
|
BuildRequires: pkgconfig(libtiff-4)
|
||||||
BuildRequires: pkgconfig(libwebp)
|
BuildRequires: pkgconfig(libwebp)
|
||||||
BuildRequires: pkgconfig(libzstd)
|
BuildRequires: pkgconfig(libzstd)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
Requires: python-numpy >= 1.11.3
|
Requires: python-numpy >= 1.15.1
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Recommends: python-Pillow
|
Recommends: python-Pillow
|
||||||
Recommends: python-blosc
|
Recommends: python-blosc
|
||||||
Recommends: python-lz4
|
Recommends: python-lz4
|
||||||
Recommends: python-matplotlib >= 2.2
|
Recommends: python-matplotlib >= 3.1
|
||||||
|
Recommends: python-tifffile >= 2020.5.25
|
||||||
Recommends: python-zstd
|
Recommends: python-zstd
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -75,9 +84,9 @@ Delta, XOR Delta, Floating Point Predictor, and Bitorder reversal.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n imagecodecs-%{version}
|
%setup -q -n imagecodecs-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
dos2unix README.rst
|
dos2unix README.rst
|
||||||
# prevent ImportError in CLI due to missing tifffile
|
|
||||||
sed -i '/from tifffile import imshow/d' imagecodecs/__main__.py
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
13
zopfli-headers.patch
Normal file
13
zopfli-headers.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: imagecodecs-2020.5.30/imagecodecs/zopfli.pxd
|
||||||
|
===================================================================
|
||||||
|
--- imagecodecs-2020.5.30.orig/imagecodecs/zopfli.pxd
|
||||||
|
+++ imagecodecs-2020.5.30/imagecodecs/zopfli.pxd
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# Cython declarations for the `Zopfli 1.0.3` library.
|
||||||
|
# https://github.com/google/zopfli
|
||||||
|
|
||||||
|
-cdef extern from 'zopfli/zopfli.h':
|
||||||
|
+cdef extern from 'zopfli.h':
|
||||||
|
|
||||||
|
ctypedef struct ZopfliOptions:
|
||||||
|
int verbose
|
Loading…
Reference in New Issue
Block a user