Skip to content

Commit

Permalink
conda-recipe: Obtain numpy include dir from numpy itself
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarteberg committed Dec 24, 2024
1 parent b8712cc commit 825976e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [[ $1 != "" ]]; then
fi
fi

NUMPY_INCLUDE=$(${PREFIX}/bin/python3 -c 'import numpy; print(numpy.get_include())')

# On Mac, you can specify CMAKE_GENERATOR=Xcode if you want.
CMAKE_GENERATOR=${CMAKE_GENERATOR-Unix Makefiles}
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE-Release}
Expand All @@ -48,7 +50,7 @@ PYTHON_CMAKE_SETTINGS=(
-DPython3_FIND_VIRTUALENV=ONLY
-DPython3_EXECUTABLE=${PREFIX}/bin/python3
-DPython3_INCLUDE_DIR=${PREFIX}/include/python${PY_ABI}
-DPython3_NumPy_INCLUDE_DIR=${PREFIX}/lib/python${PY_VER}/site-packages/numpy/_core/include
-DPython3_NumPy_INCLUDE_DIR=${NUMPY_INCLUDE}
-DPython3_LIBRARY=${PREFIX}/lib/libpython${PY_ABI}.${DYLIB_EXT}
-DPython3_LIBRARY_RELEASE=${PREFIX}/lib/libpython${PY_ABI}.${DYLIB_EXT}
)
Expand Down

0 comments on commit 825976e

Please sign in to comment.