diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 361edeb2c..bac7141a9 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -63,6 +63,25 @@ if [[ "${sha:-}" == "" ]]; then sha=$(git rev-parse HEAD) fi +if [[ "${OSX_SDK_DIR:-}" == "" ]]; then + if [[ "${CI:-}" == "" ]]; then + echo "Please set OSX_SDK_DIR to a directory where SDKs can be downloaded to. Aborting" + exit 1 + else + export OSX_SDK_DIR=/opt/conda-sdks + /usr/bin/sudo mkdir -p "${OSX_SDK_DIR}" + /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" + fi +else + if tmpf=$(mktemp -p "$OSX_SDK_DIR" tmp.XXXXXXXX 2>/dev/null); then + rm -f "$tmpf" + echo "OSX_SDK_DIR is writeable without sudo, continuing" + else + echo "User-provided OSX_SDK_DIR is not writeable for current user! Aborting" + exit 1 + fi +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup diff --git a/recipe/build_base.bat b/recipe/build_base.bat index 59471bcac..9cf7a19ef 100644 --- a/recipe/build_base.bat +++ b/recipe/build_base.bat @@ -181,6 +181,9 @@ if errorlevel 1 exit 1 if "%_D%" neq "" copy %PREFIX%\python%_D%.exe %PREFIX%\python.exe if "%EXE_T%" neq "" copy %PREFIX%\python%EXE_T%.exe %PREFIX%\python.exe +:: Provide a python3 alias +copy %PREFIX%\python.exe %PREFIX%\python3.exe + :: bytecode compile the standard library %PREFIX%\python.exe -Wi %PREFIX%\Lib\compileall.py -f -q -x "bad_coding|badsyntax|py2_" %PREFIX%\Lib if errorlevel 1 exit 1 @@ -208,3 +211,8 @@ echo "Testing import of _sqlite3 (DLL located via PATH needed) does not print: T %PREFIX%\python.exe -v -c "import _sqlite3" 2>&1 %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 1b26b7a00..17b8d6e7b 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' %}