Compare commits

..

52 Commits

Author SHA1 Message Date
github-actions[bot]
c41d908608 Update versions-manifest (#305)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-29 11:27:37 -05:00
aparnajyothi-y
8dd72e5592 Fix for the build failures on the self-hosted Ubuntu 24.04 arm64 runner for no restart (#304)
* Update build-python-packages.yml

* Update build-python-packages.yml

* fix for ubuntu 24.04 issue for no restart
2024-08-29 09:03:33 -05:00
github-actions[bot]
b8cfd51f65 Update versions-manifest (#303)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-13 23:24:55 -05:00
aparnajyothi-y
bb9054d05d Fix for the build failures on the ubuntu 24.04 runner (#302)
* Update build-python-packages.yml

* Update build-python-packages.yml
2024-08-13 14:11:29 -05:00
github-actions[bot]
c8a840c660 Update versions-manifest (#301)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-07 10:12:25 -05:00
github-actions[bot]
b423327e4a Update versions-manifest (#300)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-06 08:44:31 -05:00
aparnajyothi-y
2f8ab97baf Fix for the Codeql-analysis.yml workflow failure (#299)
* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml
2024-07-25 08:47:57 -05:00
github-actions[bot]
9d3be767fc Update versions-manifest (#298)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-22 08:53:23 -05:00
github-actions[bot]
80d68b2b90 Update versions-manifest (#297)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-17 17:08:23 -05:00
github-actions[bot]
2438e271b9 Update versions-manifest (#296)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-16 08:56:00 -05:00
HarithaVattikuti
3970f04eb4 Add support for Ubuntu 24 arm64 runner (#294)
* Add support for Ubuntu 24 arm64 runner

* Update macos runner
2024-07-15 16:15:55 -05:00
github-actions[bot]
57f2d897a8 Update versions-manifest (#293)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-01 08:35:03 -05:00
github-actions[bot]
0c9a1f7cd6 Update versions-manifest (#292)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-26 12:15:49 -05:00
aparnajyothi-y
0e5f00e5d0 Add windows arm64 support (#291)
* Update build-python-packages.yml

* windows arm64 support

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml

* Update build-python-packages.yml
2024-06-25 13:14:08 -05:00
github-actions[bot]
1d2e861434 Update versions-manifest (#289)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-23 23:48:32 -05:00
Matthieu Darbois
d55f04f8e6 build ubuntu-22.04_arm64 on setup-actions-ubuntu-arm64-2-core (#280) 2024-06-20 08:10:34 -05:00
Priya Gupta
cb2aecd6d9 Add Support for Linux arm64 Builds (#274)
* Included ubuntu-arm64 in  Build Python package yml

* Updated builder and installer scripts

* Updated test scripts

* Modified test file

* Replaced macos-11 with macos-13

* Update build-python-packages.yml
2024-06-13 09:17:40 -05:00
github-actions[bot]
1c85886f9c Update versions-manifest (#284)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-11 21:40:26 -05:00
HarithaVattikuti
f14b797a5d Fix for corrupted published artifacts (#286)
* Add skippublishercheck

* Update download-artifact

* Remove skipcheck
2024-06-11 11:36:42 -05:00
HarithaVattikuti
cc396a6be6 Add skippublishercheck (#283) 2024-06-10 09:35:28 -05:00
HarithaVattikuti
1693c7defb Revert "Update versions-manifest (#281)" (#282)
This reverts commit 8108f421b7.
2024-06-10 08:28:48 -05:00
github-actions[bot]
8108f421b7 Update versions-manifest (#281)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-06-09 23:48:30 -05:00
Priya Gupta
8bbb5413e0 Update build-python-packages.yml (#279) 2024-06-09 23:03:19 -05:00
Matthieu Darbois
c990e6da95 chore: update action versions (#267)
This removes Node.js 16 deprecation warnings
2024-05-22 08:08:47 -05:00
HarithaVattikuti
521be20d1e Updated arm64 versions (#273) 2024-05-10 12:16:17 -05:00
github-actions[bot]
064829bd03 Update versions-manifest (#272)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-05-09 21:56:46 -05:00
github-actions[bot]
b77a7dee85 Update versions-manifest (#270)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-05-09 10:10:04 -05:00
Matthieu Darbois
37e7166250 fix: always reinstall pip (#271)
* fix: always reinstall pip

If the default pip version is also the latest one,
then the `pip` executable will be missing as the default pip
is installed only as `pip3`/`pip3.x`.

In order to always provide a `pip` executable, always reinstall pip.

* chore(ci): change default version to 3.12.3

Default to the latest stable version.
2024-05-09 08:58:58 -05:00
Matthieu Darbois
eb9433f569 feat: add ubuntu-24.04 (#269)
* feat: add ubuntu-24.04

* chore: drop support for Python 2.x builds
2024-05-08 08:33:12 -05:00
Matthieu Darbois
7c3d29faf2 fix: use --upgrade rather than --ignore-installed to upgrade pip (#268)
* fix: use `--upgrade` rather than `--ignore-installed` to upgrade pip

This removes left over files when upgrading pip.

* remove all installed python on macOS
2024-05-08 08:32:38 -05:00
github-actions[bot]
c03f98f186 Update versions-manifest (#266)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-04-29 09:49:41 -05:00
Matthieu Darbois
2573fc9af9 fix: use environment variable for PIP_ROOT_USER_ACTION (#265)
* fix: error out on install failure in "Apply build artifact to the local machine" step

* fix: error out on pip installation / update failure

* fix: use environment variable for `PIP_ROOT_USER_ACTION`

This extends the fix from #259 since every platform for 3.8.10 / 3.9.13 has been rebuilt instead of just macOS arm64 being added.

The regression was introduced in #223
2024-04-29 08:32:44 -05:00
github-actions[bot]
b643f0d07f Update versions-manifest (#264)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-04-25 09:25:58 -05:00
Matthieu Darbois
29394d0042 fix: use environment variable for PIP_ROOT_USER_ACTION (#259)
The option does not exists in every pip version, using the environment variable allows for pip not to fail in this case.
2024-04-24 22:44:10 -05:00
github-actions[bot]
3545308dfe Update versions-manifest (#263)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-04-10 08:55:23 -05:00
github-actions[bot]
fa96e2aca9 Update versions-manifest (#262)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-04-03 08:08:11 -05:00
github-actions[bot]
1dbece3419 Update versions-manifest (#261)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-03-20 23:04:31 -05:00
github-actions[bot]
627cd1691f Update versions-manifest (#260)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-03-12 22:55:28 -05:00
github-actions[bot]
c685daccab Update versions-manifest (#258)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-02-16 09:17:14 -06:00
HarithaVattikuti
eaf1258a7f version update (#257) 2024-02-14 11:34:20 -06:00
github-actions[bot]
9903e2d963 Update versions-manifest (#256)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-02-07 22:49:09 -06:00
github-actions[bot]
310d6e4aea Update versions-manifest (#255)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-01-19 08:31:57 -06:00
github-actions[bot]
af22c2b8e4 Update versions-manifest (#251)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-12-08 10:03:33 +01:00
github-actions[bot]
e605eda13a Update versions-manifest (#250)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-12-05 17:14:53 +01:00
github-actions[bot]
96dae786ca Update versions-manifest (#249)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-11-23 16:02:00 +01:00
github-actions[bot]
e642abaef8 Update versions-manifest (#248)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-10-16 11:25:28 +02:00
Edgar Ramírez Mondragón
381057ce36 Update modules removed in Python 3.13 (#247) 2023-10-16 10:51:58 +02:00
github-actions[bot]
5da3a44cc2 Update versions-manifest (#244)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-10-03 11:05:53 +02:00
Dmitry Shibanov
3880dd814a add logic with generation hash (#246) 2023-09-22 15:04:14 +02:00
Marko Zivic
ba0b46a6a1 Merge pull request #245 from actions/deprecation-policy
Add Support Notification Policy
2023-09-20 14:01:26 +02:00
Dusan Trickovic
b81fc1cff7 Update README.md and Add Support Notification Policy 2023-09-20 12:53:45 +02:00
github-actions[bot]
f4b33352f0 Update versions-manifest (#243)
Co-authored-by: Service account <no-reply@microsoft.com>
2023-09-19 18:28:50 +02:00
17 changed files with 1552 additions and 81 deletions

View File

@@ -1,11 +1,11 @@
name: Build Python package
run-name: Generate Python ${{ inputs.VERSION || '3.11.0' }}
run-name: Generate Python ${{ inputs.VERSION || '3.12.3' }}
on:
workflow_dispatch:
inputs:
VERSION:
description: 'Python version to build and upload'
default: '3.11.0'
default: '3.12.3'
required: true
PUBLISH_RELEASES:
description: 'Whether to publish releases'
@@ -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,macos-11_x64,macos-11_arm64,windows-2019_x64,windows-2019_x86'
default: 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-12_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64'
pull_request:
paths-ignore:
- 'versions-manifest.json'
@@ -25,7 +25,7 @@ on:
- 'main'
env:
VERSION: ${{ inputs.VERSION || '3.11.0' }}
VERSION: ${{ inputs.VERSION || '3.12.3' }}
defaults:
run:
shell: pwsh
@@ -39,9 +39,9 @@ jobs:
- name: Generate execution matrix
id: generate-matrix
run: |
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,macos-11,macos-11_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-12,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' }}".Split(",").Trim()
$matrix = @()
foreach ($configuration in $configurations) {
$parts = $configuration.Split("_")
$os = $parts[0]
@@ -51,6 +51,17 @@ jobs:
"*macos*" { $platform = 'darwin' }
"*windows*" { $platform = 'win32' }
}
if ($configuration -eq "ubuntu-22.04_arm64") {
$os = "setup-actions-ubuntu-arm64-2-core"
}
elseif ($configuration -eq "ubuntu-24.04_arm64") {
$os = "setup-actions-ubuntu24-arm64-2-core"
}
elseif ($configuration -eq "windows-2019_arm64") {
$os = "setup-actions-windows-arm64-4-core"
}
$matrix += @{
'platform' = $platform
'os' = $os
@@ -58,7 +69,7 @@ jobs:
}
}
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
build_python:
needs: generate_matrix
strategy:
@@ -67,11 +78,34 @@ jobs:
include: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.11.0' }}-${{ matrix.platform }}-${{ matrix.arch }}
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Setup Environment on Windows ARM64 Runner
if: matrix.os == 'setup-actions-windows-arm64-4-core'
shell: powershell
run: |
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install PowerShell
choco install powershell-core -y
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install Git
choco install git -y
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install 7-Zip
choco install 7zip -y
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
@@ -79,12 +113,13 @@ jobs:
run: |
./builders/build-python.ps1 -Version $env:VERSION `
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
- name: Publish artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/artifact
if-no-files-found: error
test_python:
needs: [generate_matrix, build_python]
@@ -94,21 +129,49 @@ jobs:
include: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.11.0' }}-${{ matrix.platform }}-${{ matrix.arch }}
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Setup Environment on Windows ARM64 Runner
if: matrix.os == 'setup-actions-windows-arm64-4-core'
shell: powershell
run: |
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install PowerShell
choco install powershell-core -y
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install Git
choco install git -y
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# Install 7-Zip
choco install 7zip -y
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Fully cleanup the toolcache directory before testing
run: ./helpers/clean-toolcache.ps1 -ToolName "Python"
- name: Delete macOS /Library/Frameworks/Python.framework
if: matrix.platform == 'darwin'
shell: bash
run: if [ -d /Library/Frameworks/Python.framework ]; then sudo rm -rf /Library/Frameworks/Python.framework; fi
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Extract files
run: |
@@ -123,6 +186,7 @@ jobs:
- name: Apply build artifact to the local machine
run: |
$PSNativeCommandUseErrorActionPreference = $true
if ('${{ matrix.platform }}' -eq 'win32') {
powershell ./setup.ps1
} else {
@@ -132,7 +196,7 @@ jobs:
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Setup Python ${{ env.VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.VERSION }}
architecture: ${{ matrix.arch }}
@@ -150,7 +214,7 @@ jobs:
- name: Run tests
run: |
Install-Module Pester -Force -Scope CurrentUser
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
Import-Module Pester
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
Version="${{ env.VERSION }}";
@@ -170,7 +234,7 @@ jobs:
needs: test_python
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Publish Release ${{ env.VERSION }}
id: create_release
@@ -183,21 +247,34 @@ jobs:
body: |
Python ${{ env.VERSION }}
- name: Generate hash for packages
run: |
$childItems = Get-Childitem -Path '.'
$childItems | Foreach-Object {
$packageObj = Get-Childitem -Path $_.FullName | Select-Object -First 1
Write-Host "Package: $($packageObj.Name)"
$actualHash = (Get-FileHash -Path $packageObj.FullName -Algorithm sha256).Hash
$hashString = "$actualHash $($packageObj.Name)"
Write-Host "$hashString"
Add-Content -Path ./hashes.sha256 -Value "$hashString"
}
- name: Upload release assets
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
for (let artifactDir of fs.readdirSync('.')) {
let artifactName = fs.readdirSync(`${artifactDir}`)[0];
let artifactName = fs.lstatSync(artifactDir).isDirectory() ? fs.readdirSync(`${artifactDir}`)[0] : artifactDir;
console.log(`Upload ${artifactName} asset`);
github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ steps.create_release.outputs.id }},
name: artifactName,
data: fs.readFileSync(`./${artifactDir}/${artifactName}`)
data: fs.lstatSync(artifactDir).isDirectory() ? fs.readFileSync(`./${artifactDir}/${artifactName}`) : fs.readFileSync(`./${artifactName}`).toString()
});
}
@@ -207,7 +284,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger "Create Pull Request" workflow
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -217,4 +294,3 @@ jobs:
workflow_id: 'create-pr.yml',
ref: 'main'
});

View File

@@ -13,4 +13,5 @@ jobs:
name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
with:
languages: "['python']"
languages: '["python"]'

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

View File

@@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
python: [3.9.12, 3.10.8, 3.11.10]
python: [3.9.13, 3.10.11, 3.11.8]
steps:
- name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

View File

@@ -21,5 +21,7 @@ We aim to make new versions of Python available as soon as they are released. Bo
When a new version of an operating system is released and made available for use with [GitHub hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources), we will provide the **latest existing patch versions of Python for all major versions that have not reached [end-of-life](https://devguide.python.org/versions/)**. Any subsequent Python versions will be made available for the new OS as well.
Beginning **approximately six months prior** to the removal of a Python version from the [versions-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file, a pinned issue will be created in the [setup-python](https://github.com/actions/setup-python) repository. This pinned issue will provide important details about the upcoming end of support, including the specific date, as well as any other notes, relevant updates or alternatives. We encourage users to regularly check pinned issues for updates on tool versions they are using for maximum transparency, security, performance and overall compatibility with their projects.
## Contribution
Contributions are welcome! See [Contributor's Guide](./CONTRIBUTING.md) for more details about contribution process and code structure

View File

@@ -97,6 +97,7 @@ class NixPythonBuilder : PythonBuilder {
$variablesToReplace = @{
"{{__VERSION_FULL__}}" = $this.Version;
"{{__ARCH__}}" = $this.Architecture;
}
$variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) }

View File

@@ -37,16 +37,9 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$configureString += " --enable-shared"
$configureString += " --enable-optimizations"
### Compile with ucs4 for Python 2.x. On 3.x, ucs4 is enabled by default
if ($this.Version -lt "3.0.0") {
$configureString += " --enable-unicode=ucs4"
}
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
### Compile with support of loadable sqlite extensions.
### Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
if ($this.Version -ge "3.2.0") {
$configureString += " --enable-loadable-sqlite-extensions"
}
$configureString += " --enable-loadable-sqlite-extensions"
Write-Host "The passed configure options are: "
Write-Host $configureString
@@ -60,17 +53,13 @@ class UbuntuPythonBuilder : NixPythonBuilder {
Prepare system environment by installing dependencies and required packages.
#>
if (($this.Version -gt "3.0.0") -and ($this.Version -lt "3.5.3")) {
Write-Host "Python3 versions lower than 3.5.3 are not supported"
if ($this.Version -lt "3.5.3") {
Write-Host "Python versions lower than 3.5.3 are not supported"
exit 1
}
### Compile with tkinter support
if ($this.Version -gt "3.0.0") {
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
} else {
$tkinterInstallString = "sudo apt install -y python-tk tk-dev"
}
$tkinterInstallString = "sudo apt-get install -y --allow-downgrades python3-tk tk-dev"
Execute-Command -Command "sudo apt-get update"
Execute-Command -Command $tkinterInstallString
@@ -85,7 +74,8 @@ class UbuntuPythonBuilder : NixPythonBuilder {
"libsqlite3-dev",
"libncursesw5-dev",
"libreadline-dev",
"libgdbm-dev"
"libgdbm-dev",
"liblzma-dev"
) | ForEach-Object {
Execute-Command -Command "sudo apt install -y $_"
}

View File

@@ -60,6 +60,8 @@ class WinPythonBuilder : PythonBuilder {
} else {
$ArchitectureExtension = ".amd64"
}
}elseif ($this.Architecture -eq "arm64") {
$ArchitectureExtension = "-arm64"
}
return $ArchitectureExtension

Submodule helpers updated: 896369fc7d...6fbb1f0f20

View File

@@ -69,8 +69,9 @@ fi
chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR python
echo "Upgrading pip..."
export PIP_ROOT_USER_ACTION=ignore
./python -m ensurepip
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location --root-user-action=ignore
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location
echo "Install OpenSSL certificates"
sh -e "${PYTHON_APPLICATION_PATH}/Install Certificates.command"

View File

@@ -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
@@ -49,8 +50,9 @@ fi
chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR python
echo "Upgrading pip..."
export PIP_ROOT_USER_ACTION=ignore
./python -m ensurepip
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location --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

View File

@@ -133,8 +133,12 @@ if ($MajorVersion -ne "2") {
}
Write-Host "Install and upgrade Pip"
$Env:PIP_ROOT_USER_ACTION = "ignore"
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location --root-user-action=ignore"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade --force-reinstall pip --no-warn-script-location"
if ($LASTEXITCODE -ne 0) {
Throw "Error happened during pip installation / upgrade"
}
Write-Host "Create complete file"
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null

View File

@@ -103,4 +103,8 @@ Describe "Tests" {
It "Check urlopen with HTTPS works" {
"python ./sources/python-urlopen-https.py" | Should -ReturnZeroExitCode
}
It "Check a single dist-info per distribution is present" {
"python ./sources/dist-info.py" | Should -ReturnZeroExitCode
}
}

View File

@@ -0,0 +1,24 @@
import glob
import os.path
import sysconfig
from collections import defaultdict
def check_dist_info():
paths = set([sysconfig.get_path("purelib"), sysconfig.get_path("platlib")])
versions = defaultdict(list)
for path in paths:
pattern = os.path.join(path, "*.dist-info")
for dist_info in glob.glob(pattern):
name = os.path.basename(dist_info).split("-", maxsplit=1)[0]
versions[name].append(dist_info)
exit_code = 0
for name in versions:
if len(versions[name]) > 1:
print("multiple dist-info found for {}: {}".format(name, versions[name]))
exit_code = 1
exit(exit_code)
if __name__ == "__main__":
check_dist_info()

View File

@@ -28,7 +28,7 @@ if os_type == 'Darwin': expected_ld_library_extension = 'dylib'
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

View File

@@ -274,6 +274,27 @@ if sys.version_info >= (3, 12):
standard_library.remove('asyncore')
standard_library.remove('asynchat')
# 'aifc', 'cgi', 'cgitb', 'chunk', 'crypt', 'imghdr', 'lib2to3', 'mailcap', 'nntplib',
# 'pipes', 'sndhdr', 'sunau', 'telnetlib', 'uu' and 'xdrlib' modules have been removed
# from Python 3.13
# https://docs.python.org/dev/whatsnew/3.13.html
if sys.version_info >= (3, 13):
standard_library.remove('aifc')
standard_library.remove('cgi')
standard_library.remove('cgitb')
standard_library.remove('chunk')
standard_library.remove('crypt')
standard_library.remove('imghdr')
standard_library.remove('lib2to3')
standard_library.remove('mailcap')
standard_library.remove('nntplib')
standard_library.remove('pipes')
standard_library.remove('sndhdr')
standard_library.remove('sunau')
standard_library.remove('telnetlib')
standard_library.remove('uu')
standard_library.remove('xdrlib')
# Remove tkinter and Easter eggs
excluded_modules = [
'antigravity',

File diff suppressed because it is too large Load Diff