From 4f256313ae693de4618480ef7e2756eaa1ab9323 Mon Sep 17 00:00:00 2001 From: Tony Paulussen Date: Tue, 19 Sep 2023 10:26:32 +0200 Subject: [PATCH] fix: provide python3 alias on windows --- recipe/build_base.bat | 8 ++++++++ recipe/meta.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 12b0a08e1..b87f03366 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -189,6 +189,9 @@ if errorlevel 1 exit 1 :: We need our Python to be found! if "%_D%" neq "" copy %PREFIX%\python%_D%.exe %PREFIX%\python.exe +:: Provide a python3 alias +copy %PREFIX%\python.exe %PREFIX%\python3.exe + %PREFIX%\python.exe -Wi %PREFIX%\Lib\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\Lib if errorlevel 1 exit 1 @@ -218,3 +221,8 @@ echo "Testing import of _sqlite3 (DLL located via PATH needed) does not print: T %CONDA_EXE% run -p %PREFIX% cd %PREFIX% & %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1 %CONDA_EXE% run -p %PREFIX% cd %PREFIX% & %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1 | findstr /r /c:"The specified module could not be found" if %errorlevel% neq 1 exit /b 1 + +:: Also check python3 alias +echo "Testing print() does not print: Hello with python3" +%CONDA_EXE% run -p %PREFIX% cd %PREFIX% & %PREFIX%\python3.exe -c "print()" 2>&1 | findstr /r /c:"Hello" +if %errorlevel% neq 1 exit /b 1 \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9794e8b8c..262243a2b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -4,7 +4,7 @@ {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} {% set ver3nd = ''.join(version.split('.')[0:3]) %} -{% set build_number = 0 %} +{% set build_number = 1 %} # this makes the linter happy {% set channel_targets = channel_targets or 'conda-forge main' %}