Accepting request 1009084 from home:jayvdb:branches:devel:languages:python

- Update imagecodecs_distributor_setup.py to skip unbuildable exts
- Refresh always-cythonize.patch
- Enable s390x & ppc64 builds
- Update to v2022.9.26

OBS-URL: https://build.opensuse.org/request/show/1009084
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=17
This commit is contained in:
Dirk Mueller 2022-10-10 07:26:06 +00:00 committed by Git OBS Bridge
parent c84e56f8fa
commit ca587188c8
6 changed files with 136 additions and 36 deletions

View File

@ -1,13 +1,29 @@
Index: imagecodecs-2021.6.8/setup.py
Index: imagecodecs-2022.9.26/setup.py
===================================================================
--- imagecodecs-2021.6.8.orig/setup.py
+++ imagecodecs-2021.6.8/setup.py
@@ -105,7 +105,7 @@ def ext(**kwargs):
--- imagecodecs-2022.9.26.orig/setup.py
+++ imagecodecs-2022.9.26/setup.py
@@ -94,7 +94,7 @@ def ext(**kwargs):
extra_compile_args=[],
extra_link_args=[],
cython_compile_time_env={},
- cythonize=False,
+ cythonize=True,
)
d.update(kwargs)
return d
@@ -114,13 +114,13 @@ OPTIONS = {
'extra_compile_args': [],
'extra_link_args': [],
'cython_compile_time_env': {},
- 'cythonize': False, # sys.version_info >= (3, 11)
+ 'cythonize': True, # sys.version_info >= (3, 11)
}
OPTIONS = {
- 'cythonize': 'PyPy' in sys.version, # or sys.version_info >= (3, 10)
+ 'cythonize': True,
'include_dirs': ['imagecodecs'],
'library_dirs': [],
'libraries': ['m'] if sys.platform != 'win32' else [],
EXTENSIONS = {
'shared': ext(
cython_compile_time_env={'IS_PYPY': 'PyPy' in sys.version},
- cythonize='PyPy' in sys.version,
+ cythonize=True, #'PyPy' in sys.version,
),
'imcd': ext(sources=['imagecodecs/imcd.c']),
'aec': ext(libraries=['aec']),

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b2799ee39a3bc465d2068b70dc6eb643aa4817435d3ef38cc087f5e863dc9da
size 10181378

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:04d5757d8fd7819844b0f8d9eed05025dca4962f280d0010b42c7c9c993fe371
size 13508043

View File

@ -8,11 +8,16 @@ def customize_build(EXTENSIONS, OPTIONS):
includedir = os.getenv("INCDIR",'') + '/'
del EXTENSIONS['apng'] # png-apng library not available
del EXTENSIONS['blosc2'] # blosc2 library not available
del EXTENSIONS['brunsli'] # graphics/brunsli not in Factory
del EXTENSIONS['jetraw'] # jetraw library not available
del EXTENSIONS['jpeg12'] # jpeg12 requires custom build
del EXTENSIONS['jpegxl'] # jpeg-xl library not available
del EXTENSIONS['lerc'] # LERC library not available
del EXTENSIONS['lz4f'] # requires static linking
del EXTENSIONS['jpegxl'] # jpeg-xl library not available
del EXTENSIONS['brunsli'] # Brunsli library not available
del EXTENSIONS['mozjpeg'] # mozjpeg library not available
del EXTENSIONS['zfp'] # zfp library 0.5.5 not supported
EXTENSIONS['avif']['libraries'] = [
'avif',
@ -21,13 +26,13 @@ def customize_build(EXTENSIONS, OPTIONS):
'rav1e',
]
if sys.maxsize < 2**63 - 1:
# no zfp on 32-bit platforms
del EXTENSIONS['zfp']
# del EXTENSIONS['zfp']
# avif tests fail on 32-bit
del EXTENSIONS['avif']
# spng build fail on 32-bit
del EXTENSIONS['spng']
openjpeg_inc = subprocess.check_output(
['pkgconf', '--variable=includedir', 'libopenjp2'],

View File

@ -1,3 +1,75 @@
-------------------------------------------------------------------
Sun Oct 9 08:05:22 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
- Update imagecodecs_distributor_setup.py to skip unbuildable exts
- Refresh always-cythonize.patch
- Enable s390x & ppc64 builds
- Update to v2022.9.26
* Pass 6357 tests.
* Support JPEG XL multi-channel (planar grayscale only) and multi-frame.
* Require libjxl 0.7 (breaking).
* Switch to Blosc2 API and require c-blosc 2.4 (breaking).
* Return LogLuv encoded TIFF as float32.
* Add RGBE codec via rgbe.c.
- from v2022.8.8
* Drop support for libjpeg.
* Fix encoding JPEG in RGB color space.
* Require ZFP 1.0.
- from v2022.7.31
* Add option to decode WebP as RGBA.
* Add option to specify WebP compression method.
* Use exact lossless WebP encoding.
- from v2022.7.27
* Add LZW encoder.
* Add QOI codec via qoi.h
* Add HEIF codec via libheif
* Add JETRAW codec via Jetraw demo (source only).
* Add ByteShuffle codec, a generic version of FloatPred.
* Replace imcd_floatpred by imcd_byteshuffle (breaking).
* Use bool type in imcd (breaking).
- from v2022.2.22
* Fix jpeg numcodecs with tables
* Add APNG codec via libpng-apng patch.
* Add lossless and decodingspeed parameters to jpegxl_encode
* Add option to read JPEG XL animations.
* Add dummy numthreads parameter to codec functions.
* Set default numthreads to 1 (disable multi-threading).
* Drop support for Python 3.7 and numpy < 1.19 (NEP29).
- from v2021.11.20
* Fix testing on pypy and Python 3.10.
- from v2021.11.11
* Require libjxl 0.6.x.
* Add CMS codec via Little CMS library for color space transformations (WIP).
* Add MOZJPEG codec via mozjpeg library (Windows only).
* Add SPNG codec via libspng library.
* Rename avif_encode maxthreads parameter to numthreads (breaking).
* Accept n-dimensional output in non-image numcodecs decoders.
* Support masks in LERC codec.
* Support multi-threading and planar format in JPEG2K codec.
* Support multi-resolution, MCT, bitspersample, and 32-bit in jpeg2k encoder.
* Change jpeg2k_encode level parameter to fixed quality psnr (breaking).
* Change jpegxl_encode effort parameter default to minimum 3.
* Change JPEG encoders to use YCbCr for RGB images by default.
* Replace lerc_encode planarconfig with planar parameter (breaking).
* Add option to specify omp numthreads and chunksize in ZFP codec.
* Set default numthreads to 0.
* Fix Blosc default typesize.
* Fix segfault in jpegxl_encode.
* Replace many constants with enums (breaking).
- from v2021.8.26
* Add BLOSC2 codec via c-blosc2 library.
* Require LERC 3 and libjxl 0.5.
* Do not exceed literal-only size in PackBits encoder.
* Raise ImcdError if output is insufficient in PackBits codecs (breaking).
* Raise ImcdError if input is corrupt in PackBits decoder (breaking).
* Fix delta codec for non-native byteorder.
- from v2021.7.30
* Support more dtypes and axes argument in PackBits encoder.
* Fix worst case output size in PackBits encoder.
* Fix decoding AVIF created with older libavif.
* Fix decoding GIF with disposal to previous for first frame.
* Add lossless option in jpeg_encode.
-------------------------------------------------------------------
Wed Jun 30 07:28:42 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-imagecodecs
#
# Copyright (c) 2021 SUSE LLC
# 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
@ -28,7 +28,7 @@
%define skip_python2 1
%define skip_python36 1
Name: python-imagecodecs%{psuffix}
Version: 2021.6.8
Version: 2022.9.26
Release: 0
Summary: Image transformation, compression, and decompression codecs
License: BSD-3-Clause
@ -37,18 +37,18 @@ Source: https://files.pythonhosted.org/packages/source/i/imagecodecs/ima
Source1: imagecodecs_distributor_setup.py
Patch0: always-cythonize.patch
BuildRequires: %{python_module Cython >= 0.29.19}
BuildRequires: %{python_module numpy-devel >= 1.15.1}
BuildRequires: %{python_module numpy-devel >= 1.19.2}
BuildRequires: %{python_module setuptools >= 18.0}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-numpy >= 1.15.1
Requires: python-numpy >= 1.19.2
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: python-Pillow
Recommends: python-blosc
Recommends: python-lz4
Recommends: python-matplotlib >= 3.1
Recommends: python-matplotlib >= 3.3
Recommends: python-numcodecs
Recommends: python-tifffile >= 2021.1.11
Recommends: python-zstd
@ -57,9 +57,11 @@ BuildRequires: %{python_module Brotli}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module blosc}
BuildRequires: %{python_module czifile}
# dask is needed for doctests, but it fails
#BuildRequires: %%{python_module dask}
BuildRequires: %{python_module imagecodecs >= %{version}}
BuildRequires: %{python_module lz4}
BuildRequires: %{python_module matplotlib >= 3.1}
BuildRequires: %{python_module matplotlib >= 3.3}
BuildRequires: %{python_module numcodecs}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-snappy}
@ -90,6 +92,7 @@ BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(cfitsio)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libbrotlicommon)
BuildRequires: pkgconfig(libheif)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(liblzma)
@ -108,8 +111,6 @@ BuildRequires: zfp-devel
BuildRequires: pkgconfig(libavif)
%endif
%endif
# Upstream: big endian is not supported
ExcludeArch: s390x ppc64
%python_subpackages
%description
@ -129,6 +130,7 @@ Bitshuffle, and Float24 (24-bit floating point).
# the patch from github requires unix line endings to apply
dos2unix tests/test_imagecodecs.py
%autopatch -p1
cp %SOURCE1 ./
dos2unix README.rst
# https://github.com/cgohlke/imagecodecs/pull/15#issuecomment-795744838
@ -152,9 +154,14 @@ export INCDIR="%{_includedir}"
%check
%if %{with test}
# Should add --doctest-modules %%{buildroot}%%{$python_sitearch}/imagecodecs/imagecodecs.py
# however doctests are currently broken
%pytest_arch tests -rs --import-mode append
# Should add --doctest-modules %%{$python_sitearch}/imagecodecs/imagecodecs.py
# however doctests are currently broken, with importing dask not working
# All heif tests fail
# lerc is not built, but a few tests still run and fail
# spng fail on i586
# two tests for in test_tifffile for webp, possibly because python-tifffile needs to be updated
%pytest_arch tests -rs -k 'not (heif or lerc or spng or (test_tifffile and webp))'
%endif
%if !%{with test}
@ -168,8 +175,8 @@ export INCDIR="%{_includedir}"
%license LICENSE imagecodecs/licenses/*
%doc README.rst
%python_alternative %{_bindir}/imagecodecs
%{python_sitearch}/imagecodecs-%{version}*-info
%{python_sitearch}/imagecodecs
%{python_sitearch}/imagecodecs-%{version}*-info/
%{python_sitearch}/imagecodecs/
%endif
%changelog