diff --git a/setup.py b/setup.py index 25e3415a..2e23e506 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,8 @@ import os import re -import sys import platform +import sys +import sysconfig import subprocess from setuptools import setup, Extension @@ -43,7 +44,10 @@ def build_extension(self, ext): '-DKOMPUTE_OPT_BUILD_PYTHON=1', '-DKOMPUTE_OPT_ENABLE_SPDLOG=0', '-DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=1', - '-DPYTHON_EXECUTABLE=' + sys.executable] + '-DPYTHON_EXECUTABLE=' + sys.executable, + '-DPYTHON_INCLUDE_DIR=' + sysconfig.get_path('include'), + '-DPYTHON_LIBRARY=' + sysconfig.get_path('stdlib'), + ] cfg = 'Debug' if self.debug else 'Release' build_args = ['--config', cfg]