From 3e443443649e689a9e595fbdb232d934ac1bf921 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 12 Feb 2021 13:49:39 +0100 Subject: [PATCH] set EXT_SUFFIX in build-lib.{sh|bat} --- conda/faiss-gpu/build-pkg.sh | 3 +++ conda/faiss/build-pkg.bat | 4 ++++ conda/faiss/build-pkg.sh | 3 +++ 3 files changed, 10 insertions(+) diff --git a/conda/faiss-gpu/build-pkg.sh b/conda/faiss-gpu/build-pkg.sh index c3aaca65ec..e2520532be 100755 --- a/conda/faiss-gpu/build-pkg.sh +++ b/conda/faiss-gpu/build-pkg.sh @@ -6,6 +6,9 @@ set -e +# needed by CMakeLists.txt for correct extension +export EXT_SUFFIX=$(python -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") +echo "Setting environment variable EXT_SUFFIX to \"${EXT_SUFFIX}\" (from python-sysconfig)" # Build avx2 version. cmake -B _build_python_${PY_VER}_avx2 \ diff --git a/conda/faiss/build-pkg.bat b/conda/faiss/build-pkg.bat index 37b08556aa..abda3456af 100644 --- a/conda/faiss/build-pkg.bat +++ b/conda/faiss/build-pkg.bat @@ -3,6 +3,10 @@ :: This source code is licensed under the MIT license found in the :: LICENSE file in the root directory of this source tree. +:: needed by CMakeLists.txt for correct extension +for /f "delims=" %%i in ('python -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"') do set "EXT_SUFFIX=%%i" +echo Setting environment variable EXT_SUFFIX to "%EXT_SUFFIX%" (from python-sysconfig) + :: Build vanilla version (no avx). cmake -B _build_python_%PY_VER% ^ -T v141 ^ diff --git a/conda/faiss/build-pkg.sh b/conda/faiss/build-pkg.sh index 541537bd00..5bbc5d77a6 100755 --- a/conda/faiss/build-pkg.sh +++ b/conda/faiss/build-pkg.sh @@ -6,6 +6,9 @@ set -e +# needed by CMakeLists.txt for correct extension +export EXT_SUFFIX=$(python -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") +echo "Setting environment variable EXT_SUFFIX to \"${EXT_SUFFIX}\" (from python-sysconfig)" # Build avx2 version. cmake -B _build_python_${PY_VER}_avx2 \