diff --git a/imagecodecs_distributor_setup.py b/imagecodecs_distributor_setup.py index c2ed243..b711920 100644 --- a/imagecodecs_distributor_setup.py +++ b/imagecodecs_distributor_setup.py @@ -1,3 +1,5 @@ +import platform + def customize_build(EXTENSIONS, OPTIONS): """Customize build for Fedora""" @@ -27,3 +29,6 @@ def customize_build(EXTENSIONS, OPTIONS): del EXTENSIONS['jpeg2k'] # Uses 3rdparty source to use private function - https://github.com/cgohlke/imagecodecs/issues/77 EXTENSIONS['jpegxr']['include_dirs'].append('/usr/include/jxrlib') EXTENSIONS['zopfli']['include_dirs'].append('/usr/include/zopfli') + + if platform.machine() == 's390x': + del EXTENSIONS['lzfse'] # Not supported on big-endian diff --git a/python-imagecodecs.spec b/python-imagecodecs.spec index 6a4bdc5..1a84145 100644 --- a/python-imagecodecs.spec +++ b/python-imagecodecs.spec @@ -12,6 +12,8 @@ Source: %{pypi_source} Source1: imagecodecs_distributor_setup.py Patch0: python-imagecodecs-noexcept.patch +ExcludeArch: %{ix86} + BuildRequires: python3-devel BuildRequires: python3-Cython BuildRequires: gcc-c++ @@ -20,6 +22,7 @@ BuildRequires: blosc2-devel BuildRequires: bzip2-devel BuildRequires: cfitsio-devel BuildRequires: CharLS-devel +BuildRequires: brotli-devel BuildRequires: giflib-devel BuildRequires: jxrlib-devel BuildRequires: lcms2-devel @@ -33,7 +36,9 @@ BuildRequires: libpng-devel BuildRequires: libtiff-devel >= 4.5.0 BuildRequires: libzstd-devel BuildRequires: lz4-devel +%ifnarch s390x BuildRequires: lzfse-devel +%endif # Uses 3rdparty source to use private function - https://github.com/cgohlke/imagecodecs/issues/77 #BuildRequires: openjpeg2-devel BuildRequires: snappy-devel @@ -45,13 +50,16 @@ BuildRequires: zopfli-devel BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist blosc} BuildRequires: %{py3_dist blosc2} +BuildRequires: %{py3_dist brotli} BuildRequires: %{py3_dist lz4} BuildRequires: %{py3_dist numcodecs} -BuildRequires: %{py3_dist pyliblzfse} BuildRequires: %{py3_dist python-snappy} BuildRequires: %{py3_dist tifffile} BuildRequires: %{py3_dist zarr} BuildRequires: %{py3_dist zstd} +%ifnarch s390x +BuildRequires: %{py3_dist pyliblzfse} +%endif %global _description %{expand: Imagecodecs is a Python library that provides block-oriented, in-memory