python-imagecodecs/imagecodecs_distributor_setup.py
Dirk Mueller b8f177977f Accepting request 878211 from home:bnavigator:branches:devel:languages:python
- Update to version 2021.2.26
  Pass 4915 tests. Support X2 and X4 floating point predictors
  (found in DNG).
- enable additional codecs through imagecodecs_distributor_setup.py
- Add imagecodecs-pr15-test_jpegls.patch
  gh#cgohlke/imagecodecs#15
- disable builds for big-endian platforms as per upstream README

OBS-URL: https://build.opensuse.org/request/show/878211
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imagecodecs?expand=0&rev=14
2021-03-11 15:26:27 +00:00

36 lines
994 B
Python

# openSUSE extension setup to build python-imagecodecs
import os
import subprocess
import sys
def customize_build(EXTENSIONS, OPTIONS):
includedir = os.getenv("INCDIR",'') + '/'
del EXTENSIONS['jpeg12'] # jpeg12 requires custom build
del EXTENSIONS['lerc'] # LERC library not available
del EXTENSIONS['lz4f'] # requires static linking
del EXTENSIONS['jpegxl'] # Brunsli library not available
EXTENSIONS['avif']['libraries'] = [
'avif',
'aom',
'dav1d',
'rav1e',
]
# no zfp on 32-bit platforms
if sys.maxsize < 2**63 - 1:
del EXTENSIONS['zfp']
openjpeg_inc = subprocess.check_output(
['pkgconf', '--variable=includedir', 'libopenjp2'],
text=True,
).strip()
EXTENSIONS['jpeg2k']['include_dirs'].append(openjpeg_inc)
EXTENSIONS['jpegxr']['include_dirs'].append(includedir + 'jxrlib')
EXTENSIONS['zopfli']['include_dirs'].append(includedir + 'zopfli')