From de13fdeb5a1f37a88b1252c05e8986a7e74150b1 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 27 Dec 2016 09:21:38 -0500 Subject: [PATCH] Made setup.py always set PYTHON_INCLUDE_DIR and PYTHON_LIBRARY based on distutils environment variables for all versions of python, not just conda. --- setup.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 7b43c55a8..fc425f464 100644 --- a/setup.py +++ b/setup.py @@ -505,12 +505,10 @@ class build(_build): # make sure build artifacts are generated for the version of Python currently running 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')] + 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): cmake_extra_arch += ['-DPYTHON3=yes']