diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml
index d5d5b9980..90c445031 100755
--- a/.azure-pipelines/azure-pipelines-win.yml
+++ b/.azure-pipelines/azure-pipelines-win.yml
@@ -14,6 +14,12 @@ jobs:
win_64_freethreadingyes:
CONFIG: win_64_freethreadingyes
UPLOAD_PACKAGES: 'True'
+ win_arm64_freethreadingno:
+ CONFIG: win_arm64_freethreadingno
+ UPLOAD_PACKAGES: 'True'
+ win_arm64_freethreadingyes:
+ CONFIG: win_arm64_freethreadingyes
+ UPLOAD_PACKAGES: 'True'
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
diff --git a/.ci_support/win_arm64_freethreadingno.yaml b/.ci_support/win_arm64_freethreadingno.yaml
new file mode 100644
index 000000000..0ce25317d
--- /dev/null
+++ b/.ci_support/win_arm64_freethreadingno.yaml
@@ -0,0 +1,43 @@
+build_type:
+- release
+bzip2:
+- '1'
+c_compiler:
+- vs2022
+c_stdlib:
+- vs
+channel_sources:
+- conda-forge/label/python_rc,conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- vs2022
+expat:
+- '2'
+freethreading:
+- 'no'
+libffi:
+- '3.5'
+liblzma_devel:
+- '5'
+libsqlite:
+- '3'
+openssl:
+- '3.5'
+pin_run_as_build:
+ python:
+ min_pin: x.x
+ max_pin: x.x
+python:
+- '3.14'
+target_platform:
+- win-arm64
+tk:
+- '8.6'
+zip_keys:
+- - build_type
+ - channel_targets
+zlib:
+- '1'
+zstd:
+- '1.5'
diff --git a/.ci_support/win_arm64_freethreadingyes.yaml b/.ci_support/win_arm64_freethreadingyes.yaml
new file mode 100644
index 000000000..e82aad0ae
--- /dev/null
+++ b/.ci_support/win_arm64_freethreadingyes.yaml
@@ -0,0 +1,43 @@
+build_type:
+- release
+bzip2:
+- '1'
+c_compiler:
+- vs2022
+c_stdlib:
+- vs
+channel_sources:
+- conda-forge/label/python_rc,conda-forge
+channel_targets:
+- conda-forge main
+cxx_compiler:
+- vs2022
+expat:
+- '2'
+freethreading:
+- 'yes'
+libffi:
+- '3.5'
+liblzma_devel:
+- '5'
+libsqlite:
+- '3'
+openssl:
+- '3.5'
+pin_run_as_build:
+ python:
+ min_pin: x.x
+ max_pin: x.x
+python:
+- '3.14'
+target_platform:
+- win-arm64
+tk:
+- '8.6'
+zip_keys:
+- - build_type
+ - channel_targets
+zlib:
+- '1'
+zstd:
+- '1.5'
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/README.md b/README.md
index 78eed68b8..84b4babd1 100644
--- a/README.md
+++ b/README.md
@@ -212,6 +212,20 @@ Current build status
+
+ | win_arm64_freethreadingno |
+
+
+
+
+ |
+
+ | win_arm64_freethreadingyes |
+
+
+
+
+ |
diff --git a/conda-forge.yml b/conda-forge.yml
index a16962d89..ab94597ad 100644
--- a/conda-forge.yml
+++ b/conda-forge.yml
@@ -9,6 +9,7 @@ build_platform:
linux_aarch64: linux_64
linux_ppc64le: linux_64
osx_arm64: osx_64
+ win_arm64: win_64
conda_build:
pkg_format: '2'
conda_forge_output_validation: true
diff --git a/recipe/build_base.bat b/recipe/build_base.bat
index 59471bcac..b0f1bc800 100644
--- a/recipe/build_base.bat
+++ b/recipe/build_base.bat
@@ -2,14 +2,30 @@ setlocal EnableDelayedExpansion
echo on
:: Compile python, extensions and external libraries
-if "%ARCH%"=="64" (
- set PLATFORM=x64
- set VC_PATH=x64
- set BUILD_PATH=amd64
-) else (
- set PLATFORM=Win32
- set VC_PATH=x86
- set BUILD_PATH=win32
+if "%target_platform%"=="win-64" (
+ set HOST_PLATFORM=x64
+ set HOST_DIR=amd64
+)
+if "%target_platform%"=="win-32" (
+ set HOST_PLATFORM=Win32
+ set HOST_DIR=win32
+)
+if "%target_platform%"=="win-arm64" (
+ set HOST_PLATFORM=ARM64
+ set HOST_DIR=arm64
+)
+
+if "%build_platform%"=="win-64" (
+ set BUILD_PLATFORM=x64
+ set BUILD_DIR=amd64
+)
+if "%build_platform%"=="win-32" (
+ set BUILD_PLATFORM=Win32
+ set BUILD_DIR=win32
+)
+if "%build_platform%"=="win-arm64" (
+ set BUILD_PLATFORM=ARM64
+ set BUILD_DIR=arm64
)
for /F "tokens=1,2 delims=." %%i in ("%PKG_VERSION%") do (
@@ -61,25 +77,25 @@ cd PCbuild
:: Twice because:
:: error : importlib_zipimport.h updated. You will need to rebuild pythoncore to see the changes.
-call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM%
-call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %PLATFORM%
+call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %HOST_PLATFORM%
+call build.bat %PGO% %CONFIG% %FREETHREADING% -m -e -v -p %HOST_PLATFORM%
if errorlevel 1 exit 1
cd ..
:: Populate the root package directory
for %%x in (python%VERNODOTS%%THREAD%%_D%.dll python3%THREAD%%_D%.dll python%EXE_T%%_D%.exe pythonw%EXE_T%%_D%.exe) do (
- if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x (
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX%
+ if exist %SRC_DIR%\PCbuild\%HOST_DIR%\%%x (
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\%%x %PREFIX%
) else (
- echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist"
+ echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\%%x does not exist"
)
)
for %%x in (python%THREAD%%_D%.pdb python%VERNODOTS%%THREAD%%_D%.pdb pythonw%THREAD%%_D%.pdb) do (
- if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x (
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x %PREFIX%
+ if exist %SRC_DIR%\PCbuild\%HOST_DIR%\%%x (
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\%%x %PREFIX%
) else (
- echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\%%x does not exist"
+ echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\%%x does not exist"
)
)
@@ -90,7 +106,7 @@ if errorlevel 1 exit 1
:: Populate the DLLs directory
mkdir %PREFIX%\DLLs
-xcopy /s /y %SRC_DIR%\PCBuild\%BUILD_PATH%\*.pyd %PREFIX%\DLLs\
+xcopy /s /y %SRC_DIR%\PCBuild\%HOST_DIR%\*.pyd %PREFIX%\DLLs\
if errorlevel 1 exit 1
copy /Y %SRC_DIR%\PC\icons\py.ico %PREFIX%\DLLs\
@@ -132,12 +148,12 @@ for %%x in (idle pydoc) do (
:: Populate the libs directory
if not exist %PREFIX%\libs mkdir %PREFIX%\libs
-dir %SRC_DIR%\PCbuild\%BUILD_PATH%\
-if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python%VERNODOTS%%THREAD%%_D%.lib %PREFIX%\libs\
+dir %SRC_DIR%\PCbuild\%HOST_DIR%\
+if exist %SRC_DIR%\PCbuild\%HOST_DIR%\python%VERNODOTS%%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\python%VERNODOTS%%THREAD%%_D%.lib %PREFIX%\libs\
if errorlevel 1 exit 1
-if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\python3%THREAD%%_D%.lib %PREFIX%\libs\
+if exist %SRC_DIR%\PCbuild\%HOST_DIR%\python3%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\python3%THREAD%%_D%.lib %PREFIX%\libs\
if errorlevel 1 exit 1
-if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\_tkinter%THREAD%%_D%.lib %PREFIX%\libs\
+if exist %SRC_DIR%\PCbuild\%HOST_DIR%\_tkinter%THREAD%%_D%.lib copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\_tkinter%THREAD%%_D%.lib %PREFIX%\libs\
if errorlevel 1 exit 1
@@ -148,20 +164,20 @@ if errorlevel 1 exit 1
:: Copy venv[w]launcher scripts to venv\srcipts\nt
:: See https://github.com/python/cpython/blob/b4a316087c32d83e375087fd35fc511bc430ee8b/Lib/venv/__init__.py#L334-L376
-if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe (
+if exist %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe (
@rem We did copy pythonw.exe until 3.12 but starting with 3.13 we seem to need the latter. Should we omit the first?
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\python.exe
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\python.exe
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvlauncher%THREAD%%_D%.exe
) else (
- echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvlauncher%THREAD%%_D%.exe does not exist"
+ echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\venvlauncher%THREAD%%_D%.exe does not exist"
)
-if exist %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe (
+if exist %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe (
@rem We did copy pythonw.exe until 3.12 but starting with 3.13 we seem to need the latter. Should we omit the first?
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\pythonw.exe
- copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\pythonw.exe
+ copy /Y %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe %PREFIX%\Lib\venv\scripts\nt\venvwlauncher%THREAD%%_D%.exe
) else (
- echo "WARNING :: %SRC_DIR%\PCbuild\%BUILD_PATH%\venvwlauncher%THREAD%%_D%.exe does not exist"
+ echo "WARNING :: %SRC_DIR%\PCbuild\%HOST_DIR%\venvwlauncher%THREAD%%_D%.exe does not exist"
)
:: Remove test data to save space.