Skip to content

Commit 53edb05

Browse files
committed
Add Python_ROOT_DIR as argument
cmake can have issues finding the python distro> add Python_ROOT_DIR parameter
1 parent 4fca3a4 commit 53edb05

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

conda-recipe/bld.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ cmake .. -G "NMake Makefiles" ^
2424
-DCMAKE_BUILD_TYPE=Release ^
2525
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY="%SP_DIR%" ^
2626
-DCMAKE_SWIG_OUTDIR="%SP_DIR%" ^
27+
-DPython_ROOT_DIR="%PREFIX%\bin" ^
2728
-DPYTHON_VERSION="%PYTHON_VERSION_NUMERIC%" ^
2829
-DBUILD_LIBRARY=OFF ^
2930
-DWITH_AVX=OFF ^

conda-recipe/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ mkdir b2 && cd b2
33
if [[ "${target_platform}" == osx-* ]]; then
44
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
55
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
6-
else
7-
export CONFIG_ARGS=""
86
fi
97

108
cmake -S .. -B . \
@@ -15,9 +13,10 @@ cmake -S .. -B . \
1513
-DBUILD_LIBRARY=OFF \
1614
-DWITH_AVX=OFF \
1715
-DBoost_USE_STATIC_LIBS=OFF \
16+
-DPython_ROOT_DIR="${PREFIX}/bin" \
1817
-DPYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')\
1918
-G Ninja \
20-
"${CONFIG_ARGS}"
19+
${CONFIG_ARGS}
2120

2221
ninja install -j ${CPU_COUNT}
2322

0 commit comments

Comments
 (0)