Skip to content

Commit 818719f

Browse files
committed
Again blindly fix on linux
1 parent f5059ac commit 818719f

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

cmake/yup_dependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function (_yup_fetch_python root_dir use_static_libs modules)
124124
endif()
125125

126126
set (Python_USE_STATIC_LIBS "${use_static_libs}")
127-
find_package (Python COMPONENTS ${modules} REQUIRED)
127+
find_package (Python REQUIRED COMPONENTS ${modules})
128128

129129
endfunction()
130130

python/setup.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,23 @@ def build_extension(self, ext):
105105

106106
config = "Debug" if self.debug or self.build_for_coverage else "Release"
107107
cmake_args = [
108-
f"-DYUP_BUILD_WHEEL=ON",
109-
f"-DYUP_EXPORT_MODULES=OFF",
110-
f"-DYUP_BUILD_EXAMPLES=OFF",
111-
f"-DYUP_BUILD_TESTS=OFF",
112-
f"-DCMAKE_BUILD_TYPE={config}",
113-
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={output_path}",
114-
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{config.upper()}={output_path}"
108+
f"-DYUP_BUILD_WHEEL:BOOL=ON",
109+
f"-DYUP_EXPORT_MODULES:BOOL=OFF",
110+
f"-DYUP_BUILD_EXAMPLES:BOOL=OFF",
111+
f"-DYUP_BUILD_TESTS:BOOL=OFF",
112+
f"-DCMAKE_BUILD_TYPE:STRING={config}",
113+
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH={output_path}",
114+
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{config.upper()}:PATH={output_path}"
115115
]
116116

117117
if platform.system() != "Linux":
118118
cmake_args += [
119-
f"-DPython_ROOT_DIR={sys.exec_prefix}",
120-
f"-DPython_INCLUDE_DIRS={get_python_includes_path()}",
121-
f"-DPython_LIBRARY_DIRS={get_python_lib_path()}"
119+
f"-DPython_ROOT_DIR:PATH={sys.exec_prefix}",
120+
f"-DPython_INCLUDE_DIRS:PATH={get_python_includes_path()}",
121+
f"-DPython_LIBRARY_DIRS:PATH={get_python_lib_path()}"
122122
]
123+
else:
124+
cmake_args += [f"-DPYTHON_EXECUTABLE:FILEPATH={sys.executable}"]
123125

124126
if platform.system() == 'Darwin':
125127
cmake_args += [

0 commit comments

Comments
 (0)