Code Monkey home page Code Monkey logo

Comments (2)

cgohlke avatar cgohlke commented on June 15, 2024

Should be fixed in v2020.5.30.

imagecodecs/setup.py

Lines 268 to 312 in f38d0d4

def customize_build_cf(EXTENSIONS, OPTIONS):
"""Customize build for conda-forge."""
library_inc = os.environ.get('LIBRARY_INC', '')
del EXTENSIONS['jpeg12']
del EXTENSIONS['jpegxl']
del EXTENSIONS['lerc']
del EXTENSIONS['zfp']
# build jpeg8 against libjpeg instead of libjpeg_turbo
OPTIONS['cythonize'] = True
EXTENSIONS['jpeg8']['cython_compile_env']['HAVE_LIBJPEG_TURBO'] = False
EXTENSIONS['jpegxr']['libraries'] = ['libjpegxr', 'libjxrglue']
EXTENSIONS['jpegxr']['include_dirs'] = [
os.path.join(library_inc, 'jpegxr')
]
if sys.platform == 'win32':
EXTENSIONS['bz2']['libraries'] = ['bzip2']
EXTENSIONS['jpeg2k']['include_dirs'] = [
os.path.join(
library_inc, 'openjpeg-' + os.environ.get('openjpeg', '2.3')
)
]
EXTENSIONS['jpegls']['libraries'] = ['charls-2-x64']
EXTENSIONS['lz4']['libraries'] = ['liblz4']
EXTENSIONS['lzma']['libraries'] = ['liblzma']
EXTENSIONS['png']['libraries'] = ['libpng', 'z']
EXTENSIONS['webp']['libraries'] = ['libwebp']
# customize builds based on environment
try:
from imagecodecs_distributor_setup import customize_build
except ImportError:
if os.environ.get('COMPUTERNAME', '').startswith('CG-'):
customize_build = customize_build_cg
elif os.environ.get('LD_LIBRARY_PATH', os.environ.get('LIBRARY_PATH', '')):
customize_build = customize_build_ci
elif os.environ.get('LIBRARY_INC', ''):
customize_build = customize_build_cf
else:
customize_build = customize_build_default

If the (untested) customize_build_cf function does not work, you can provide your own imagecodecs_distributor_setup.customize_build function.

from imagecodecs.

hmaarrfk avatar hmaarrfk commented on June 15, 2024

Thanks!

from imagecodecs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.