From c12be56770d07fe74db94c9288e22504c9c8bc3f Mon Sep 17 00:00:00 2001 From: Tony Paulussen Date: Tue, 19 Sep 2023 10:22:01 +0200 Subject: [PATCH 1/2] 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..e9fb1bdc4 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 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2d91667ad..75d2c186f 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' %} From f5f85639f8655281ede665d53e89a4e8c1e5337a Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 08:46:46 +0000 Subject: [PATCH 2/2] MNT: Re-rendered with conda-build 3.26.1, conda-smithy 3.25.1, and conda-forge-pinning 2023.09.19.07.30.00 --- .azure-pipelines/azure-pipelines-linux.yml | 5 ----- .azure-pipelines/azure-pipelines-win.yml | 5 ++++- .scripts/run_osx_build.sh | 10 +++++----- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 95caa820e..0cf650570 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -16,11 +16,6 @@ jobs: timeoutInMinutes: 360 steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 0efa0c4d0..46847d077 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -61,7 +61,10 @@ jobs: if EXIST LICENSE.txt ( copy LICENSE.txt "recipe\\recipe-scripts-license.txt" ) - conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables + if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" + ) + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% displayName: Build recipe env: PYTHONUNBUFFERED: 1 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 025708f93..800756926 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -55,11 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -75,6 +70,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml