Merge pull request #2544 from melvyn-sopacua/freebsd-compat

Ignore openjpeg 1.5 on FreeBSD
This commit is contained in:
wiredfool 2017-05-27 14:32:10 +01:00 committed by GitHub
commit 08fea6b881

View File

@ -63,6 +63,9 @@ def _add_directory(path, subdir, where=None):
else:
_dbg('Inserting path %s', subdir)
path.insert(where, subdir)
elif subdir in path and where is not None:
path.remove(subdir)
path.insert(where, subdir)
def _find_include_file(self, include):
@ -462,6 +465,10 @@ class pil_build_ext(build_ext):
# Add the directory to the include path so we can include
# <openjpeg.h> rather than having to cope with the versioned
# include path
# FIXME (melvyn-sopacua):
# At this point it's possible that best_path is already in
# self.compiler.include_dirs. Should investigate how that is
# possible.
_add_directory(self.compiler.include_dirs, best_path, 0)
feature.jpeg2000 = 'openjp2'
feature.openjpeg_version = '.'.join(str(x) for x in best_version)