Skip to content

Commit

Permalink
Merge pull request #2544 from melvyn-sopacua/freebsd-compat
Browse files Browse the repository at this point in the history
Ignore openjpeg 1.5 on FreeBSD
  • Loading branch information
wiredfool committed May 27, 2017
2 parents c37fa5a + 5d7480a commit 08fea6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -462,6 +465,10 @@ def build_extensions(self):
# 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)
Expand Down

0 comments on commit 08fea6b

Please sign in to comment.