Skip to content

Commit b18e4eb

Browse files
committed
fix: provide python3 alias on windows
1 parent 69c4e2e commit b18e4eb

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

recipe/build_base.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ if errorlevel 1 exit 1
181181
:: We need our Python to be found!
182182
if "%_D%" neq "" copy %PREFIX%\python%_D%.exe %PREFIX%\python.exe
183183

184+
:: Provide a python3 alias
185+
copy %PREFIX%\python.exe %PREFIX%\python3.exe
186+
184187
%PREFIX%\python.exe -Wi %PREFIX%\Lib\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\Lib
185188
if errorlevel 1 exit 1
186189

@@ -210,3 +213,8 @@ echo "Testing import of _sqlite3 (DLL located via PATH needed) does not print: T
210213
%CONDA_EXE% run -p %PREFIX% cd %PREFIX% & %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1
211214
%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"
212215
if %errorlevel% neq 1 exit /b 1
216+
217+
:: Also check python3 alias
218+
echo "Testing print() does not print: Hello with python3"
219+
%CONDA_EXE% run -p %PREFIX% cd %PREFIX% & %PREFIX%\python3.exe -c "print()" 2>&1 | findstr /r /c:"Hello"
220+
if %errorlevel% neq 1 exit /b 1

recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
55
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
66
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
7-
{% set build_number = 0 %}
7+
{% set build_number = 1 %}
88

99
# this makes the linter happy
1010
{% set channel_targets = channel_targets or 'conda-forge main' %}

0 commit comments

Comments
 (0)