From d8e8bd930486185929fad47cf595e2255eb8d93d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 31 May 2025 08:08:16 +1100 Subject: [PATCH 1/3] add Python{,3}_FIND_REGISTRY=NEVER to CMAKE_ARGS --- recipe/activate.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/activate.bat b/recipe/activate.bat index 08f4eed..f5b6a53 100755 --- a/recipe/activate.bat +++ b/recipe/activate.bat @@ -105,6 +105,8 @@ set "VCVARSBAT=@{vcvarsbat}" set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release" IF "%CONDA_BUILD%" == "1" ( set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PROGRAM_PATH=%BUILD_PREFIX%\bin;%BUILD_PREFIX%\Scripts;%BUILD_PREFIX%\Library\bin;%PREFIX%\bin;%PREFIX%\Scripts;%PREFIX%\Library\bin" + :: see https://github.com/conda-forge/conda-smithy/issues/2319 + set "CMAKE_ARGS=%CMAKE_ARGS% -DPython_FIND_REGISTRY=NEVER -DPython3_FIND_REGISTRY=NEVER" ) IF NOT "@{target_platform}" == "@{host_platform}" ( From 8f3d4b649d950c7add4643f94dbf699b5db540ed Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 18 Jul 2025 15:58:54 +1100 Subject: [PATCH 2/3] bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3af8cf4..d467198 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -18,7 +18,7 @@ {% set vcvars_ver_maj = cl_version.split(".")[0]|int - 5 %} {% set vcvars_ver_min = cl_version.split(".")[1]|int %} {% set vcvars_ver = vcvars_ver_maj ~ "." ~ vcvars_ver_min %} -{% set build_num = 27 %} +{% set build_num = 28 %} package: name: vs{{ vsyear }} From 4f9e21e419d033c2be327139017808b79dfec631 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 18 Jul 2025 17:17:03 +1100 Subject: [PATCH 3/3] Revert "Merge pull request #95 from h-vetinari/reactivate" This reverts commit a7bcdfdfbd0b7c893d4431d254db1d6f685830cc, reversing changes made to d33641be49976fa5bc94e8c8b5d382a7091de42a. --- recipe/activate.bat | 22 ---------------------- recipe/deactivate.bat | 17 ----------------- recipe/vc_repack.py | 6 ------ 3 files changed, 45 deletions(-) delete mode 100644 recipe/deactivate.bat diff --git a/recipe/activate.bat b/recipe/activate.bat index f5b6a53..ca83adc 100755 --- a/recipe/activate.bat +++ b/recipe/activate.bat @@ -1,18 +1,3 @@ -@@echo off -setlocal enabledelayedexpansion - -:: save existing variables for deactivation script -for %%X in ( - CC CXX CMAKE_ARGS CMAKE_GENERATOR CMAKE_GENERATOR_PLATFORM CMAKE_GENERATOR_TOOLSET - CMAKE_PREFIX_PATH CONDA_BUILD_CROSS_COMPILATION DISTUTILS_USE_SDK INCLUDE - LIB MSSdk MSYS2_ARG_CONV_EXCL MSYS2_ENV_CONV_EXCL PY_VCRUNTIME_REDIST - VCVARSBAT VS_MAJOR VS_VERSION VS_YEAR VSINSTALLDIR WindowsSDKVer -) do ( - if defined %%X ( - set "_CONDA_BACKUP_%%X=!%%X!" - ) -) - @@echo on :: Set env vars that tell distutils to use the compiler that we put on path @@ -173,13 +158,6 @@ if %ERRORLEVEL% neq 0 ( ) popd -:: unset auxiliary variables -set "CMAKE_GEN=" -set "CMAKE_PLAT=" -set "LATEST_VS=" -set "NEWER_VS_WITH_OLDER_VC=" -set "USE_NEW_CMAKE_GEN_SYNTAX=" - :GetWin10SdkDir call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node > nul 2>&1 if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node > nul 2>&1 diff --git a/recipe/deactivate.bat b/recipe/deactivate.bat deleted file mode 100644 index 1dfee83..0000000 --- a/recipe/deactivate.bat +++ /dev/null @@ -1,17 +0,0 @@ -@@echo off -setlocal enabledelayedexpansion - -:: restore variables -for %%X in ( - CC CXX CMAKE_ARGS CMAKE_GENERATOR CMAKE_GENERATOR_PLATFORM CMAKE_GENERATOR_TOOLSET - CMAKE_PREFIX_PATH CONDA_BUILD_CROSS_COMPILATION DISTUTILS_USE_SDK INCLUDE - LIB MSSdk MSYS2_ARG_CONV_EXCL MSYS2_ENV_CONV_EXCL PY_VCRUNTIME_REDIST - VCVARSBAT VS_MAJOR VS_VERSION VS_YEAR VSINSTALLDIR WindowsSDKVer -) do ( - if defined _CONDA_BACKUP_%%X ( - set "%%X=!_CONDA_BACKUP_%%X!" - set "_CONDA_BACKUP_%%X=" - ) else ( - set "%%X=" - ) -) diff --git a/recipe/vc_repack.py b/recipe/vc_repack.py index 8cf396e..5b257a5 100644 --- a/recipe/vc_repack.py +++ b/recipe/vc_repack.py @@ -371,12 +371,6 @@ def main(): ) as w: for line in r: w.write(subs(line, args)) - targetdir = os.path.join(env.prefix, "etc", "conda", "deactivate.d") - os.makedirs(targetdir) - shutil.copyfile( - os.path.join(env.recipe_dir, "deactivate.bat"), - os.path.join(targetdir, f"vs{args.activate_year}_compiler_vars.bat"), - ) if __name__ == "__main__":