Skip to content

Commit

Permalink
Merge pull request #8 from pypr/freebsd-fix
Browse files Browse the repository at this point in the history
Add /usr/local/include when compiling extensions.
  • Loading branch information
prabhuramachandran committed Feb 8, 2019
2 parents a63e959 + f380d9f commit cbc775f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compyle/ext_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __init__(self, src, extension='pyx', root=None, verbose=False,
self.verbose = verbose
self.depends = depends
self.extra_inc_dirs = extra_inc_dirs if extra_inc_dirs else []
self._add_local_include()
self.extra_compile_args = (
extra_compile_args if extra_compile_args else []
)
Expand All @@ -110,6 +111,12 @@ def __init__(self, src, extension='pyx', root=None, verbose=False,
self.shared_filesystem = False
self._create_source()

def _add_local_include(self):
if sys.platform != 'win32':
local = '/usr/local/include'
if local not in self.extra_inc_dirs:
self.extra_inc_dirs.append(local)

def _setup_filenames(self):
base = self.name
self.src_path = join(self.root, base + '.' + self.extension)
Expand Down

0 comments on commit cbc775f

Please sign in to comment.