Skip to content

Commit

Permalink
Changes needed for barnacle (#136)
Browse files Browse the repository at this point in the history
* Changes needed for barnacle

* Flake8
  • Loading branch information
wasade authored Oct 19, 2021
1 parent 5d9be3e commit 3f4f412
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,21 @@ def run_compile_ssu(self):
else:
LINK_ARGS = []

if 'CONDA_PREFIX' in os.environ:
CONDA_INCLUDES = [os.environ.get('CONDA_PREFIX') + '/include']
else:
CONDA_INCLUDES = []

USE_CYTHON = os.environ.get('USE_CYTHON', True)
ext = '.pyx' if USE_CYTHON else '.cpp'
extensions = [Extension("unifrac._api",
sources=["unifrac/_api" + ext,
"sucpp/api.cpp"],
language="c++",
extra_compile_args=["-std=c++11"],
extra_link_args=["-std=c++11"] + LINK_ARGS,
include_dirs=[np.get_include()] + ['sucpp/'],
extra_link_args=LINK_ARGS,
include_dirs=([np.get_include()] +
['sucpp/'] +
CONDA_INCLUDES),
libraries=['ssu'])]

if USE_CYTHON:
Expand Down

0 comments on commit 3f4f412

Please sign in to comment.