Skip to content

Commit 3f4f412

Browse files
authored
Changes needed for barnacle (#136)
* Changes needed for barnacle * Flake8
1 parent 5d9be3e commit 3f4f412

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

setup.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,21 @@ def run_compile_ssu(self):
7373
else:
7474
LINK_ARGS = []
7575

76+
if 'CONDA_PREFIX' in os.environ:
77+
CONDA_INCLUDES = [os.environ.get('CONDA_PREFIX') + '/include']
78+
else:
79+
CONDA_INCLUDES = []
80+
7681
USE_CYTHON = os.environ.get('USE_CYTHON', True)
7782
ext = '.pyx' if USE_CYTHON else '.cpp'
7883
extensions = [Extension("unifrac._api",
7984
sources=["unifrac/_api" + ext,
8085
"sucpp/api.cpp"],
8186
language="c++",
82-
extra_compile_args=["-std=c++11"],
83-
extra_link_args=["-std=c++11"] + LINK_ARGS,
84-
include_dirs=[np.get_include()] + ['sucpp/'],
87+
extra_link_args=LINK_ARGS,
88+
include_dirs=([np.get_include()] +
89+
['sucpp/'] +
90+
CONDA_INCLUDES),
8591
libraries=['ssu'])]
8692

8793
if USE_CYTHON:

0 commit comments

Comments
 (0)