diff --git a/python/perspective/setup.py b/python/perspective/setup.py index 3cbfcc3815..784a97d213 100644 --- a/python/perspective/setup.py +++ b/python/perspective/setup.py @@ -14,6 +14,7 @@ import re import subprocess import sys +import sysconfig from codecs import open from distutils.version import LooseVersion @@ -129,6 +130,12 @@ def build_extension_cmake(self, ext): "-DPython_ADDITIONAL_VERSIONS={}".format(PYTHON_VERSION), "-DPython_FIND_VERSION={}".format(PYTHON_VERSION), "-DPython_EXECUTABLE={}".format(sys.executable).replace("\\", "/"), + "-DPYTHON_LIBRARY={}".format(sysconfig.get_config_var("LIBDIR")).replace( + "\\", "/" + ), + "-DPYTHON_INCLUDE_DIR={}".format( + sysconfig.get_config_var("INCLUDEPY") + ).replace("\\", "/"), "-DPython_ROOT_DIR={}".format(sys.prefix).replace("\\", "/"), "-DPython_ROOT={}".format(sys.prefix).replace("\\", "/"), "-DPSP_CMAKE_MODULE_PATH={folder}".format(