Commit c22bedc1 authored by hiiwave's avatar hiiwave Committed by Davis E. King

Modify setup.py so that it can be installed under conda environment (#377)

parent 2f91cd6c
...@@ -504,6 +504,14 @@ class build(_build): ...@@ -504,6 +504,14 @@ class build(_build):
# make sure build artifacts are generated for the version of Python currently running # make sure build artifacts are generated for the version of Python currently running
cmake_extra_arch = [] cmake_extra_arch = []
if 'conda' in sys.version:
# to support conda distribution
from distutils.sysconfig import get_python_inc
import distutils.sysconfig as sysconfig
cmake_extra_arch += ['-DPYTHON_INCLUDE_DIR=' + get_python_inc()]
cmake_extra_arch += ['-DPYTHON_LIBRARY=' + sysconfig.get_config_var('LIBDIR')]
if sys.version_info >= (3, 0): if sys.version_info >= (3, 0):
cmake_extra_arch += ['-DPYTHON3=yes'] cmake_extra_arch += ['-DPYTHON3=yes']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment