Overview

The following tutorials are targeting the currently known most simple and clean way of building any Python packages, even if those include platform specific extension (mostly C/C++) code.

These steps assume clean (Win10) system.

Third party dependencies should be solved case by case and as soon as those are solved, these can be the final steps to create release packages.

1. Setting the evironment

Common requirement

1.2. Build machine: x64

Background: https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28593914166/setuptools-distutils#4.-WoA-(win-arm64)-support

1. Install latest (matching with the arm64win Python version in next step) win-x64 Python release to x64 machine from

2. Get latest (same version as x64 above) arm64win Python from http://nuget.org

3. Create and activate virtual environment by the x64 Python

C:\Users\<user>\AppData\Local\Programs\Python\Python310-32\python.exe --version
Python 3.10.0rc1
C:\Users\<user>\AppData\Local\Programs\Python\Python310-32\python.exe -m venv <venv dir>
<venv dir>\Scripts\activate.bat

4. Copy arm64win Python libs to x64 venv

5.Make sure latest distutils is used from setuptools (not older than setuptools-57.4.0)

6. Set environment variables to mimic cross-compilation

7. Goto https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28594241585/Package+building+tutorial#2.-Build-the-package

1.2. Build machine: WoA = win-arm64

Background: https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28593914166/setuptools-distutils#4.-WoA-(win-arm64)-support

  1. Get release version of arm64python

  2. Create and activate virtual environment

    <arm64python>\python.exe -m venv <venv dir>
    <venv dir>\Scripts\activate.bat
  3. Install pre-release arm64win packages
    https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28598239406/Python#Custom-pre-release-package-builds-(wheel-files)

  4. Goto https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28594241585/Package+building+tutorial#2.-Build-the-package

2. Build the package

2.1. Test the system

The final goal here is to have a portable wheel file, but until we’re not sure the extension (mostly C/C++) build process (build_ext) is working, for try and error it doesn’t make sense to invoke the full process of wheel generation.

2.2. Create portable wheel file