From 9b6097373e457ab86e4e05535a95586c7b81cd1a Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Sun, 10 Apr 2022 22:03:17 -0700 Subject: [PATCH] Another attempt --- CMakeLists.txt | 4 ++-- pyproject.toml | 2 +- setup.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3725b1..0bd1c44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,11 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.18) include(CheckIPOSupported) include(tools/CompilerWarnings.cmake) project(quicktex) # Find dependencies -find_package(Python COMPONENTS Interpreter Development) +find_package(Python COMPONENTS Interpreter Development.Module) find_package(pybind11 CONFIG REQUIRED) find_package(OpenMP) diff --git a/pyproject.toml b/pyproject.toml index 456ba8c..98e1cbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "setuptools>=61", "setuptools_scm>=6.2", "wheel", - "cmake>=3.17", + "cmake>=3.18", "pybind11~=2.6.1", "ninja; sys_platform != 'win32'", ] diff --git a/setup.py b/setup.py index 6c9179b..51f7c12 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ class CMakeBuild(build_ext): cmake_args = [ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}".format(extdir), "-Dpybind11_DIR={}".format(pybind11.get_cmake_dir()), + "-DPython_EXECUTABLE={}".format(sys.executable), "-DPython_ROOT_DIR={}".format(os.path.dirname(sys.executable)), "-DQUICKTEX_VERSION_INFO={}".format(version), "-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm