diff --git a/.github/workflows/build-python-packages.yml b/.github/workflows/build-python-packages.yml index 31212e88..a7db99b9 100644 --- a/.github/workflows/build-python-packages.yml +++ b/.github/workflows/build-python-packages.yml @@ -15,7 +15,7 @@ on: PLATFORMS: description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)' required: true - default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86' + default: 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86' pull_request: paths-ignore: - 'versions-manifest.json' @@ -39,7 +39,7 @@ jobs: - name: Generate execution matrix id: generate-matrix run: | - [String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-24.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim() + [String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11,macos-14_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim() $matrix = @() foreach ($configuration in $configurations) { diff --git a/builders/nix-python-builder.psm1 b/builders/nix-python-builder.psm1 index 4f27c447..b15878e0 100644 --- a/builders/nix-python-builder.psm1 +++ b/builders/nix-python-builder.psm1 @@ -97,6 +97,7 @@ class NixPythonBuilder : PythonBuilder { $variablesToReplace = @{ "{{__VERSION_FULL__}}" = $this.Version; + "{{__ARCH__}}" = $this.Architecture; } $variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) } diff --git a/installers/nix-setup-template.sh b/installers/nix-setup-template.sh index 588f87f2..f67c2dcc 100644 --- a/installers/nix-setup-template.sh +++ b/installers/nix-setup-template.sh @@ -1,6 +1,7 @@ set -e PYTHON_FULL_VERSION="{{__VERSION_FULL__}}" +ARCH="{{__ARCH__}}" MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1) MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2) @@ -17,7 +18,7 @@ fi PYTHON_TOOLCACHE_PATH=$TOOLCACHE_ROOT/Python PYTHON_TOOLCACHE_VERSION_PATH=$PYTHON_TOOLCACHE_PATH/$PYTHON_FULL_VERSION -PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/x64 +PYTHON_TOOLCACHE_VERSION_ARCH_PATH=$PYTHON_TOOLCACHE_VERSION_PATH/$ARCH echo "Check if Python hostedtoolcache folder exist..." if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then @@ -54,4 +55,4 @@ export PIP_ROOT_USER_ACTION=ignore ./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location echo "Create complete file" -touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete +touch $PYTHON_TOOLCACHE_VERSION_PATH/$ARCH.complete diff --git a/tests/sources/python-config-test.py b/tests/sources/python-config-test.py index d8d970e8..ea40a8ae 100644 --- a/tests/sources/python-config-test.py +++ b/tests/sources/python-config-test.py @@ -28,7 +28,7 @@ if pkg_installer: expected_lib_dir_path = f'/Library/Frameworks/Python.framework/Versions/{version_major}.{version_minor}/lib' else: - expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/x64/lib' + expected_lib_dir_path = f'{os.getenv("AGENT_TOOLSDIRECTORY")}/Python/{version}/{architecture}/lib' # Check modules ### Validate libraries path