Compare commits

...

90 Commits

Author SHA1 Message Date
Dmitry Shibanov
04ce6b25b8 return macOS-10.15 2022-12-02 12:38:17 +01:00
github-actions[bot]
1248039d12 Update versions-manifest (#206) 2022-11-30 11:24:47 +01:00
Marko Zivic
150cd39a1c Merge pull request #205 from MaksimZhukov/v-mzhukov/migrate-python-generation-to-macos-11
Switch Python generation from macOS 10.15 to 11
2022-11-28 12:58:51 +01:00
MaksimZhukov
93c66279f2 Update a comment
Co-authored-by: Marko Zivic <100996310+marko-zivic-93@users.noreply.github.com>
2022-11-28 12:07:33 +01:00
MaksimZhukov
14f269ec5f Switch Python generation from macOS 10.15 to 11 2022-11-28 10:54:51 +01:00
Marko Zivic
188d4c2fb8 Merge pull request #204 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 11/22/2022
2022-11-22 16:54:57 +01:00
Service account
99b9e07db6 Update versions-manifest 2022-11-22 15:49:39 +00:00
Marko Zivic
875651ccf2 Merge pull request #203 from MaksimZhukov/python-3.12.0-alpha2
Remove asyncore and asynchat modules from tests
2022-11-22 16:13:17 +01:00
MaksimZhukov
f6ede0f473 Remove asyncore and asynchat modules from tests 2022-11-22 15:19:00 +01:00
Marko Zivic
60672e10e2 Merge pull request #201 from actions/rename-virt-env
Rename virtual-environments to runner-images
2022-11-14 10:53:24 +01:00
Aleksandr Chebotov
188c9d47fd update link to issues 2022-11-11 12:22:36 +01:00
Aleksandr Chebotov
01c7f11a0c revert CODEOWNERS 2022-11-11 12:20:24 +01:00
Aleksandr Chebotov
2cd33e8674 Rename virtual-environments to runner-images 2022-11-11 12:17:09 +01:00
Marko Zivic
16feed7bc1 Merge pull request #200 from MaksimZhukov/update-github-script-version
Update github-script action version
2022-11-09 13:24:30 +01:00
MaksimZhukov
fe8bc0106f Update github-script action version 2022-11-09 11:56:32 +01:00
Marko Zivic
4cb1787f1c Merge pull request #199 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 11/09/2022
2022-11-09 11:52:06 +01:00
Service account
c81386e1fd Update versions-manifest 2022-11-09 10:50:05 +00:00
Marko Zivic
b37d4148f9 Merge pull request #198 from MaksimZhukov/fix-upload-assets-issue
Downgrade version of the github-script action
2022-11-09 10:46:25 +01:00
MaksimZhukov
9b2450c6ee Update python-builder.yml 2022-11-09 10:22:23 +01:00
Marko Zivic
a6c0fa93f8 Merge pull request #197 from e-korolevskii/fix-tests-for-python-3.12
Fix tests for python 3.12
2022-11-08 11:44:54 +01:00
Evgenii Korolevskii
929dab97d0 test(modules-test): Remove check for smtpd in python >= 3.12 2022-11-04 15:25:35 +01:00
Evgenii Korolevskii
149b806fe5 test(config-test): Remove libreadline check for version >= 3.12 2022-11-04 15:23:59 +01:00
Aleksandr Chebotov
1c70aa4fc9 Update workflow task (#196)
* Update workflow task

* use $env:GITHUB_OUTPUT

* update submodule
2022-10-31 15:12:41 +01:00
github-actions[bot]
379db95d31 Update versions-manifest (#195)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-10-26 12:47:26 +02:00
Vladimir Safonkin
105f6b74ad Skip sqlite test for python 3.11 and higher (#194) 2022-10-26 12:14:20 +02:00
Marko Zivic
0d8f04f6f8 Merge pull request #193 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 10/25/2022
2022-10-25 12:42:29 +02:00
Service account
11c48b4025 Update versions-manifest 2022-10-25 10:37:31 +00:00
Hugo van Kemenade
e7a13ade71 Only run scheduled jobs on upstream (#145) 2022-10-19 11:19:28 +02:00
github-actions[bot]
024142b9c3 Update versions-manifest (#192)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-10-18 12:37:53 +02:00
github-actions[bot]
5988ec7f4a Update versions-manifest (#191)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-10-18 09:55:49 +02:00
github-actions[bot]
1982aae0b6 Update versions-manifest (#190)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-10-03 11:09:51 +02:00
Matthieu Darbois
1e1d9f9032 fix: setup OpenSSL certificates in macos-pkg-setup-template.sh (#189)
The macOS pkg installer does not setup default certificates for OpenSSL.
A script is provided by the macOS pkg installer to setup those using the certifi PyPI package.
Let's run this script as part of the setup template in order to be able to do HTTPS downloads out of the box.
2022-10-03 10:13:05 +02:00
Marko Zivic
a1a012d197 Merge pull request #188 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/15/2022
2022-09-15 13:28:01 +02:00
Service account
ff7fd271bf Update versions-manifest 2022-09-15 08:54:58 +00:00
Sergey Dolin
3b05f53807 Instal osx python from prebuilt packagese (#184)
* Download osx packages and setup script

* install from pkg for 3.11 only

* More debug

* More debug

* fix version check

* New-Item build_output.txt

* installationTemplateLocation

* fix version

* fix beta version

* fix building from source

* fix building from source

* fix pkg name

* fix setup.sh

* fix test

* Fix config test with semver

* Fix PYTHON_MAJOR_MINOR

* migrate from .format to interpolation

* add PYTHON_FRAMEWORK_PATH variable

* improve pkg condition
2022-09-15 10:31:47 +02:00
Mikhail Timofeev
a28c508174 Merge pull request #187 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/12/2022
2022-09-12 18:37:00 +03:00
Service account
9db1c7f445 Update versions-manifest 2022-09-12 15:35:21 +00:00
Mikhail Timofeev
41636d5136 Merge pull request #186 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/07/2022
2022-09-07 18:19:40 +03:00
Service account
18ea6bb558 Update versions-manifest 2022-09-07 15:08:24 +00:00
Mikhail Timofeev
a22c344dd0 Merge pull request #185 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/06/2022
2022-09-06 18:44:30 +03:00
Service account
ae0a460cc0 Update versions-manifest 2022-09-06 15:31:15 +00:00
github-actions[bot]
c8b327c44a Update versions-manifest (#183)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-08-10 09:52:56 +02:00
Marko Zivic
e1b4a49828 Merge pull request #154 from actions/aloviedo-patch-1
Create codeql-analysis.yml
2022-08-03 10:25:26 +02:00
Mikhail Timofeev
42d1484d64 Merge pull request #182 from actions/update-versions-manifest-file 2022-08-02 19:43:45 +04:00
Service account
e41999429c Update versions-manifest 2022-08-02 15:39:41 +00:00
Mikhail Timofeev
241f220314 Merge pull request #180 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 07/27/2022
2022-07-27 19:33:15 +04:00
Service account
49da3d9917 Update versions-manifest 2022-07-27 06:38:20 +00:00
Marko Zivic
88aa9c4b9e Merge pull request #179 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 07/22/2022
2022-07-22 13:33:20 +02:00
Service account
d4c91ae863 Update versions-manifest 2022-07-22 10:49:38 +00:00
Marko Zivic
0f8d1383b5 Merge pull request #178 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 07/22/2022
2022-07-22 12:42:56 +02:00
Service account
ee30dbfe58 Update versions-manifest 2022-07-22 09:32:14 +00:00
Marko Zivic
f64b4b67c1 Merge pull request #177 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 07/13/2022
2022-07-13 11:14:43 +02:00
Service account
d57d1eae31 Update versions-manifest 2022-07-13 06:49:01 +00:00
Vladimir Safonkin
714163cc44 Disable universal2 macOS builds (#175)
* Disable universal2 macOS builds

* Debug

* Disable universal build and tcl test
2022-07-11 16:09:47 +02:00
Marko Zivic
eaa180e241 Merge pull request #174 from brcrista/patch-1
Document why we build from source on macOS
2022-06-29 15:49:14 +02:00
Brian Cristante
12ba6443e8 Document why we build from source on macOS 2022-06-28 11:50:54 -04:00
Marko Zivic
73379f970f Merge pull request #171 from akv-platform/v-sdolin/issue-402
Explicitly link brew tcl/tk
2022-06-27 09:18:28 +02:00
Marko Zivic
8a2b258410 Merge pull request #173 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 06/20/2022
2022-06-20 16:39:35 +02:00
Service account
d974a7a429 Update versions-manifest 2022-06-20 14:34:17 +00:00
Mikhail Koliada
34c0e9a4d6 [macOS] fix 3.8.13 build (#172) 2022-06-20 16:09:51 +02:00
Sergey Dolin
edcd32dbf1 Check tcltk for any platform and version 2022-06-18 14:48:22 +02:00
Sergey Dolin
045abfcc36 Print versions 2022-06-17 12:53:40 +02:00
Sergey Dolin
6524532238 Add test 2022-06-17 11:50:52 +02:00
Sergey Dolin
0f97bcdc23 Explicity set tcl/tk library 2022-06-17 09:08:45 +02:00
Mikhail Timofeev
bf3c64f950 Merge pull request #170 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 06/07/2022
2022-06-07 11:10:20 +04:00
Service account
f59a9522eb Update versions-manifest 2022-06-07 06:59:43 +00:00
github-actions[bot]
290229025b Update versions-manifest (#169)
Co-authored-by: Service account <no-reply@microsoft.com>
2022-06-06 14:29:55 +02:00
Vladimir Safonkin
5aad86b0d9 Merge pull request #167 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 06/02/2022
2022-06-02 20:52:19 +02:00
Vladimir Safonkin
52b4d85b8e Merge pull request #114 from bwoodsend/universal2
Compile in universal2 mode for macOS Python >= 3.9.1.
2022-06-02 16:28:49 +02:00
Service account
34e7ffccfb Update versions-manifest 2022-06-02 10:36:23 +00:00
Vladimir Safonkin
c3505cc6ce Merge pull request #166 from vsafonkin/v-vsafonkin/update-action-version
Bump setup-python action to v3 in the builder and test workflow.
2022-06-02 12:02:26 +02:00
Vladimir Safonkin
15394f2e9d Bump setup-python action to v3 2022-06-02 11:11:55 +02:00
Marko Zivic
22f110545c Merge pull request #165 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 06/02/2022
2022-06-02 10:07:33 +02:00
Service account
46959ea985 Update versions-manifest 2022-06-02 07:42:15 +00:00
Vladimir Safonkin
b7ef994bae Merge pull request #164 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 06/01/2022
2022-06-01 10:35:19 +02:00
Service account
687538e9a4 Update versions-manifest 2022-06-01 06:34:41 +00:00
Mikhail Timofeev
1d967fc811 Merge pull request #163 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 05/18/2022
2022-05-18 14:53:41 +04:00
Service account
bbe229eb2e Update versions-manifest 2022-05-18 07:24:59 +00:00
bwoodsend
3c5fa6de18 Compile in universal2 mode for macOS Python >= 3.9.1.
Using `universal2` Python environments is currently the only way to build Python
wheels which support macOS M1.
2022-05-15 19:04:56 +01:00
Mikhail Timofeev
0d45fa8df4 Merge pull request #162 from actions/update-versions-manifest-file 2022-05-08 20:19:03 +04:00
Service account
f41dd90d80 Update versions-manifest 2022-05-08 15:31:51 +00:00
Marko Zivic
b104d17dcc Merge pull request #161 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 05/04/2022
2022-05-04 11:35:03 +02:00
Service account
8f6a357755 Update versions-manifest 2022-05-04 09:06:41 +00:00
Mikhail Timofeev
53bd6a1e0c Merge pull request #160 from mikhailkoliada/add_ubuntu22-04
Add Ubuntu22.04 support
2022-05-04 11:28:14 +04:00
Mikhail Koliada
8fd7008b44 Add Ubuntu22.04 support 2022-05-03 19:18:56 +02:00
Marko Zivic
1b8db98a89 Merge pull request #159 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 04/29/2022
2022-04-29 11:48:58 +02:00
Service account
2b001ef9b4 Update versions-manifest 2022-04-29 08:39:35 +00:00
Marko Zivic
dfcce03e53 Merge pull request #157 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 04/15/2022
2022-04-15 12:40:43 +02:00
Service account
c58bf9c525 Update versions-manifest 2022-04-15 06:22:48 +00:00
aloviedo
7d68c84e28 Create codeql-analysis.yml 2022-03-30 06:49:36 -07:00
19 changed files with 1381 additions and 54 deletions

70
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '30 8 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -11,7 +11,7 @@ jobs:
name: Create Pull Request name: Create Pull Request
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true

View File

@@ -12,12 +12,13 @@ defaults:
jobs: jobs:
find_new_versions: find_new_versions:
if: github.repository_owner == 'actions'
name: Find new versions name: Find new versions
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
versions_output: ${{ steps.Get_new_versions.outputs.TOOL_VERSIONS }} versions_output: ${{ steps.Get_new_versions.outputs.TOOL_VERSIONS }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -32,7 +33,7 @@ jobs:
env: env:
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}} TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -62,7 +63,7 @@ jobs:
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}} TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
environment: Get Available Tools Versions - Publishing Approval environment: Get Available Tools Versions - Publishing Approval
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -81,7 +82,7 @@ jobs:
needs: [find_new_versions, check_new_versions, trigger_builds] needs: [find_new_versions, check_new_versions, trigger_builds]
if: failure() if: failure()
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -21,7 +21,7 @@ jobs:
Install-Module Pester -Force -Scope CurrentUser Install-Module Pester -Force -Scope CurrentUser
- name: Run tests - name: Run tests
shell: pwsh shell: pwsh
run: | run: |
Import-Module Pester Import-Module Pester
Invoke-Pester -Configuration @{ Invoke-Pester -Configuration @{

View File

@@ -14,7 +14,7 @@ on:
PLATFORMS: PLATFORMS:
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)' description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
required: true required: true
default: 'ubuntu-18.04,ubuntu-20.04,macos-10.15,windows-2019_x64,windows-2019_x86' default: 'ubuntu-18.04,ubuntu-20.04,ubuntu-22.04,macos-10.15,windows-2019_x64,windows-2019_x86'
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'versions-manifest.json' - 'versions-manifest.json'
@@ -38,7 +38,7 @@ jobs:
- name: Generate execution matrix - name: Generate execution matrix
id: generate-matrix id: generate-matrix
run: | run: |
$configurations = "${{ github.event.inputs.platforms || 'ubuntu-18.04,ubuntu-20.04,macos-10.15,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim() [String[]]$configurations = "${{ github.event.inputs.platforms || 'ubuntu-18.04,ubuntu-20.04,ubuntu-22.04,macos-10.15,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
$matrix = @() $matrix = @()
foreach ($configuration in $configurations) { foreach ($configuration in $configurations) {
@@ -56,7 +56,7 @@ jobs:
'arch' = $arch 'arch' = $arch
} }
} }
echo "::set-output name=matrix::$($matrix | ConvertTo-Json -Compress)" echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
build_python: build_python:
needs: generate_matrix needs: generate_matrix
@@ -70,7 +70,7 @@ jobs:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -80,7 +80,7 @@ jobs:
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }} -Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
- name: Publish artifact - name: Publish artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.ARTIFACT_NAME }} name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/artifact path: ${{ runner.temp }}/artifact
@@ -97,7 +97,7 @@ jobs:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -105,7 +105,7 @@ jobs:
run: ./helpers/clean-toolcache.ps1 -ToolName "Python" run: ./helpers/clean-toolcache.ps1 -ToolName "Python"
- name: Download artifact - name: Download artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
path: ${{ runner.temp }} path: ${{ runner.temp }}
@@ -131,7 +131,7 @@ jobs:
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Setup Python ${{ env.VERSION }} - name: Setup Python ${{ env.VERSION }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ env.VERSION }} python-version: ${{ env.VERSION }}
architecture: ${{ matrix.arch }} architecture: ${{ matrix.arch }}
@@ -168,7 +168,7 @@ jobs:
needs: test_python needs: test_python
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v3
- name: Publish Release ${{ env.VERSION }} - name: Publish Release ${{ env.VERSION }}
id: create_release id: create_release
@@ -182,7 +182,7 @@ jobs:
Python ${{ env.VERSION }} Python ${{ env.VERSION }}
- name: Upload release assets - name: Upload release assets
uses: actions/github-script@v2 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
script: | script: |
@@ -190,7 +190,7 @@ jobs:
for (let artifactDir of fs.readdirSync('.')) { for (let artifactDir of fs.readdirSync('.')) {
let artifactName = fs.readdirSync(`${artifactDir}`)[0]; let artifactName = fs.readdirSync(`${artifactDir}`)[0];
console.log(`Upload ${artifactName} asset`); console.log(`Upload ${artifactName} asset`);
github.repos.uploadReleaseAsset({ github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
release_id: ${{ steps.create_release.outputs.id }}, release_id: ${{ steps.create_release.outputs.id }},
@@ -205,11 +205,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Trigger "Create Pull Request" workflow - name: Trigger "Create Pull Request" workflow
uses: actions/github-script@v3 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.PERSONAL_TOKEN }} github-token: ${{ secrets.PERSONAL_TOKEN }}
script: | script: |
github.actions.createWorkflowDispatch({ github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
workflow_id: 'create-pr.yml', workflow_id: 'create-pr.yml',

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Trigger python workflow - name: Trigger python workflow
run: | run: |

View File

@@ -18,7 +18,7 @@ jobs:
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1] python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
steps: steps:
- name: setup-python ${{ matrix.python }} - name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}

View File

@@ -19,9 +19,10 @@ defaults:
jobs: jobs:
validation: validation:
if: github.repository_owner == 'actions'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@@ -34,7 +35,7 @@ jobs:
needs: [validation] needs: [validation]
if: failure() if: failure()
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true

View File

@@ -1,16 +1,16 @@
# Python for Actions # Python for Actions
This repository contains the code and scripts that we use to build Python packages used in [virtual-environments](https://github.com/actions/virtual-environments) and accessible through the [setup-python](https://github.com/actions/setup-python) Action. This repository contains the code and scripts that we use to build Python packages used in [runner-images](https://github.com/actions/runner-images) and accessible through the [setup-python](https://github.com/actions/setup-python) Action.
File [versions-manifest.json](./versions-manifest.json) contains the list of available and released versions. File [versions-manifest.json](./versions-manifest.json) contains the list of available and released versions.
> Caution: this is prepared for and only permitted for use by actions `virtual-environments` and `setup-python` action. > Caution: this is prepared for and only permitted for use by actions `runner-images` and `setup-python` action.
**Status**: Currently under development and in use for beta and preview actions. This repo is undergoing rapid changes. **Status**: Currently under development and in use for beta and preview actions. This repo is undergoing rapid changes.
Some versions are pre-installed on [virtual-environments](https://github.com/actions/virtual-environments) images. Some versions are pre-installed on [runner-images](https://github.com/actions/runner-images) images.
More versions will (soon!) be available to install on-the-fly through the [`setup-python`](https://github.com/actions/setup-python) action. More versions will (soon!) be available to install on-the-fly through the [`setup-python`](https://github.com/actions/setup-python) action.
## Adding new versions ## Adding new versions
We are trying to build and release new versions of Python as soon as they are released. Please open an issue in [actions/virtual-environments](https://github.com/actions/virtual-environments) if any versions are missing. We are trying to build and release new versions of Python as soon as they are released. Please open an issue in [actions/setup-python](https://github.com/actions/setup-python/issues) if any versions are missing.
## Contribution ## Contribution
Contributions are welcome! See [Contributor's Guide](./CONTRIBUTING.md) for more details about contribution process and code structure Contributions are welcome! See [Contributor's Guide](./CONTRIBUTING.md) for more details about contribution process and code structure

View File

@@ -7,6 +7,10 @@ class macOSPythonBuilder : NixPythonBuilder {
.DESCRIPTION .DESCRIPTION
Contains methods that required to build macOS Python artifact from sources. Inherited from base NixPythonBuilder. Contains methods that required to build macOS Python artifact from sources. Inherited from base NixPythonBuilder.
While python.org provides precompiled binaries for macOS, switching to them risks breaking existing customers.
If we wanted to start using the official binaries instead of building from source, we should avoid changing previous versions
so we remain backwards compatible.
.PARAMETER platform .PARAMETER platform
The full name of platform for which Python should be built. The full name of platform for which Python should be built.
@@ -42,6 +46,15 @@ class macOSPythonBuilder : NixPythonBuilder {
$configureString += " --enable-shared" $configureString += " --enable-shared"
$configureString += " --with-lto" $configureString += " --with-lto"
### For Python versions which support it, compile a universal2 (arm64 + x86_64 hybrid) build. The arm64 slice
### will never be used itself by a Github Actions runner but using a universal2 Python is the only way to build
### universal2 C extensions and wheels. This is supported by Python >= 3.10 and was backported to Python >=
### 3.9.1 and >= 3.8.10.
### Disabled, discussion: https://github.com/actions/python-versions/pull/114
# if ($this.Version -ge "3.8.10" -and $this.Version -ne "3.8.13" -and $this.Version -ne "3.9.0" ) {
# $configureString += " --enable-universalsdk --with-universal-archs=universal2"
# }
### OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL. ### OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
### Solution is to install these libraries from a third-party package manager, ### Solution is to install these libraries from a third-party package manager,
### and then add the appropriate paths for the header and library files to configure command. ### and then add the appropriate paths for the header and library files to configure command.
@@ -51,6 +64,9 @@ class macOSPythonBuilder : NixPythonBuilder {
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include" $env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include"
} else { } else {
$configureString += " --with-openssl=/usr/local/opt/openssl@1.1" $configureString += " --with-openssl=/usr/local/opt/openssl@1.1"
if ($this.Version -gt "3.7.12") {
$configureString += " --with-tcltk-includes='-I /usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
}
} }
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.* ### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
@@ -62,6 +78,97 @@ class macOSPythonBuilder : NixPythonBuilder {
$env:CPPFLAGS += "-I$(brew --prefix sqlite3)/include" $env:CPPFLAGS += "-I$(brew --prefix sqlite3)/include"
} }
Write-Host "The passed configure options are: "
Write-Host $configureString
Execute-Command -Command $configureString Execute-Command -Command $configureString
} }
[string] GetPkgName() {
<#
.SYNOPSIS
Return Python installation Package.
#>
$nativeVersion = Convert-Version -version $this.Version
$architecture = "-macos11"
$extension = ".pkg"
$pkg = "python-${nativeVersion}${architecture}${extension}"
return $pkg
}
[uri] GetPkgUri() {
<#
.SYNOPSIS
Get base Python URI and return complete URI for Python installation package.
#>
$base = $this.GetBaseUri()
$versionName = $this.GetBaseVersion()
$pkg = $this.GetPkgName()
$uri = "${base}/${versionName}/${pkg}"
return $uri
}
[string] DownloadPkg() {
<#
.SYNOPSIS
Download Python installation executable into artifact location.
#>
$pkgUri = $this.GetPkgUri()
Write-Host "Sources URI: $pkgUri"
$pkgLocation = Download-File -Uri $pkgUri -OutputFolder $this.WorkFolderLocation
Write-Debug "Done; Package location: $pkgLocation"
New-Item -Path $this.WorkFolderLocation -Name "build_output.txt" -ItemType File
return $pkgLocation
}
[void] CreateInstallationScriptPkg() {
<#
.SYNOPSIS
Create Python artifact installation script based on specified template.
#>
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath "macos-pkg-setup-template.sh"
$installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw
$installationScriptLocation = New-Item -Path $this.WorkFolderLocation -Name $this.InstallationScriptName -ItemType File
$variablesToReplace = @{
"{{__VERSION_FULL__}}" = $this.Version;
"{{__PKG_NAME__}}" = $this.GetPkgName();
}
$variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) }
$installationTemplateContent | Out-File -FilePath $installationScriptLocation
Write-Debug "Done; Installation script location: $installationScriptLocation)"
}
[void] Build() {
<#
.SYNOPSIS
Generates Python artifact from downloaded Python installation executable.
#>
$PkgVersion = [semver]"3.11.0-beta.1"
if ($this.Version -ge $PkgVersion) {
Write-Host "Download Python $($this.Version) [$($this.Architecture)] package..."
$this.DownloadPkg()
Write-Host "Create installation script..."
$this.CreateInstallationScriptPkg()
} else {
([NixPythonBuilder]$this).Build()
}
Write-Host "Archive artifact"
$this.ArchiveArtifact()
}
} }

View File

@@ -48,6 +48,9 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$configureString += " --enable-loadable-sqlite-extensions" $configureString += " --enable-loadable-sqlite-extensions"
} }
Write-Host "The passed configure options are: "
Write-Host $configureString
Execute-Command -Command $configureString Execute-Command -Command $configureString
} }

Submodule helpers updated: 6f1aa3ce73...896369fc7d

View File

@@ -0,0 +1,78 @@
set -e
PYTHON_FULL_VERSION="{{__VERSION_FULL__}}"
PYTHON_PKG_NAME="{{__PKG_NAME__}}"
MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1)
MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2)
PYTHON_MAJOR=python$MAJOR_VERSION
PYTHON_MAJOR_DOT_MINOR=python$MAJOR_VERSION.$MINOR_VERSION
PYTHON_MAJOR_MINOR=python$MAJOR_VERSION$MINOR_VERSION
if [ -z ${AGENT_TOOLSDIRECTORY+x} ]; then
# No AGENT_TOOLSDIRECTORY on GitHub images
TOOLCACHE_ROOT=$RUNNER_TOOL_CACHE
else
TOOLCACHE_ROOT=$AGENT_TOOLSDIRECTORY
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_FRAMEWORK_PATH="/Library/Frameworks/Python.framework/Versions/${MAJOR_VERSION}.${MINOR_VERSION}"
PYTHON_APPLICATION_PATH="/Applications/Python ${MAJOR_VERSION}.${MINOR_VERSION}"
echo "Check if Python hostedtoolcache folder exist..."
if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then
echo "Creating Python hostedtoolcache folder..."
mkdir -p $PYTHON_TOOLCACHE_PATH
else
# remove ALL other directories for same major.minor python versions
find $PYTHON_TOOLCACHE_PATH -name "${MAJOR_VERSION}.${MINOR_VERSION}.*"|while read python_version;do
python_version_x64="$python_version/x64"
if [ -e "$python_version_x64" ];then
echo "Deleting Python $python_version_x64"
rm -rf "$python_version_x64"
fi
done
fi
echo "Install Python binaries from prebuilt package"
sudo installer -pkg $PYTHON_PKG_NAME -target /
echo "Create hostedtoolcach symlinks (Required for the backward compatibility)"
echo "Create Python $PYTHON_FULL_VERSION folder"
mkdir -p $PYTHON_TOOLCACHE_VERSION_ARCH_PATH
cd $PYTHON_TOOLCACHE_VERSION_ARCH_PATH
ln -s "${PYTHON_FRAMEWORK_PATH}/bin" bin
ln -s "${PYTHON_FRAMEWORK_PATH}/include" include
ln -s "${PYTHON_FRAMEWORK_PATH}/share" share
ln -s "${PYTHON_FRAMEWORK_PATH}/lib" lib
echo "Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)"
ln -s ./bin/$PYTHON_MAJOR_DOT_MINOR python
cd bin/
# This symlink already exists if Python version with the same major.minor version is installed,
# since we do not remove the framework folder
if [ ! -f $PYTHON_MAJOR_MINOR ]; then
ln -s $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR
fi
if [ ! -f python ]; then
ln -s $PYTHON_MAJOR_DOT_MINOR python
fi
chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR python
echo "Upgrading pip..."
./python -m ensurepip
./python -m pip install --ignore-installed pip --disable-pip-version-check --no-warn-script-location
echo "Install OpenSSL certificates"
sh -e "${PYTHON_APPLICATION_PATH}/Install Certificates.command"
echo "Create complete file"
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete

View File

@@ -49,7 +49,14 @@ Describe "Tests" {
"python ./sources/simple-test.py" | Should -ReturnZeroExitCode "python ./sources/simple-test.py" | Should -ReturnZeroExitCode
} }
if (($Version -ge "3.2.0") -and -not ([semver]"$($Version.Major).$($Version.Minor)" -eq [semver]"3.11" -and $Version.PreReleaseLabel)) { # linux has no display name and no $DISPLAY environment variable - skip tk test
# if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) {
# It "Check if tcl/tk has the same headed and library versions" {
# "python ./sources/tcltk.py" | Should -ReturnZeroExitCode
# }
# }
if (($Version -ge "3.2.0") -and ($Version -lt "3.11.0")) {
It "Check if sqlite3 module is installed" { It "Check if sqlite3 module is installed" {
"python ./sources/python-sqlite3.py" | Should -ReturnZeroExitCode "python ./sources/python-sqlite3.py" | Should -ReturnZeroExitCode
} }
@@ -89,4 +96,8 @@ Describe "Tests" {
"./dist/simple-test" | Should -ReturnZeroExitCode "./dist/simple-test" | Should -ReturnZeroExitCode
} }
} }
It "Check urlopen with HTTPS works" {
"python ./sources/python-urlopen-https.py" | Should -ReturnZeroExitCode
}
} }

View File

@@ -10,6 +10,12 @@ os_type = platform.system()
version = sys.argv[1] version = sys.argv[1]
nativeVersion = sys.argv[2] nativeVersion = sys.argv[2]
versions=version.split(".")
version_major=int(versions[0])
version_minor=int(versions[1])
pkg_installer = os_type == 'Darwin' and (version_major == 3 and version_minor >= 11)
lib_dir_path = sysconfig.get_config_var('LIBDIR') lib_dir_path = sysconfig.get_config_var('LIBDIR')
ld_library_name = sysconfig.get_config_var('LDLIBRARY') ld_library_name = sysconfig.get_config_var('LDLIBRARY')
@@ -19,7 +25,11 @@ have_libreadline = sysconfig.get_config_var("HAVE_LIBREADLINE")
### Define expected variables ### Define expected variables
if os_type == 'Linux': expected_ld_library_extension = 'so' if os_type == 'Linux': expected_ld_library_extension = 'so'
if os_type == 'Darwin': expected_ld_library_extension = 'dylib' if os_type == 'Darwin': expected_ld_library_extension = 'dylib'
expected_lib_dir_path = '{0}/Python/{1}/x64/lib'.format(os.getenv("AGENT_TOOLSDIRECTORY"), version)
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'
# Check modules # Check modules
### Validate libraries path ### Validate libraries path
@@ -38,7 +48,8 @@ if is_shared:
exit(1) exit(1)
else: else:
print('%s was built without shared extensions' % ld_library_name) print('%s was built without shared extensions' % ld_library_name)
exit(1) if not pkg_installer:
exit(1)
### Validate macOS ### Validate macOS
if os_type == 'Darwin': if os_type == 'Darwin':
@@ -59,12 +70,15 @@ if os_type == 'Darwin':
if openssl_includes != expected_openssl_includes: if openssl_includes != expected_openssl_includes:
print('Invalid openssl_includes: %s; Expected: %s' % (openssl_includes, expected_openssl_includes)) print('Invalid openssl_includes: %s; Expected: %s' % (openssl_includes, expected_openssl_includes))
exit(1) if not pkg_installer:
exit(1)
if openssl_ldflags != expected_openssl_ldflags: if openssl_ldflags != expected_openssl_ldflags:
print('Invalid openssl_ldflags: %s; Expected: %s' % (openssl_ldflags, expected_openssl_ldflags)) print('Invalid openssl_ldflags: %s; Expected: %s' % (openssl_ldflags, expected_openssl_ldflags))
exit(1) if not pkg_installer:
exit(1)
### Validate libreadline ### Validate libreadline
if not have_libreadline: if sys.version_info < (3, 12):
print('Missing libreadline') if not have_libreadline:
exit(1) print('Missing libreadline')
exit(1)

View File

@@ -271,6 +271,12 @@ if sys.version_info >= (3, 11) and platform.system() == 'Linux' and '18.04' in p
standard_library.remove('tkinter') standard_library.remove('tkinter')
standard_library.remove('turtle') standard_library.remove('turtle')
# 'smtpd', 'asyncore' and 'asynchat' modules have been removed from Python 3.12
if sys.version_info >= (3, 12):
standard_library.remove('smtpd')
standard_library.remove('asyncore')
standard_library.remove('asynchat')
# Remove tkinter and Easter eggs # Remove tkinter and Easter eggs
excluded_modules = [ excluded_modules = [
'antigravity', 'antigravity',

View File

@@ -0,0 +1,10 @@
import sys
if sys.version_info[0] == 2:
from urllib2 import urlopen
else:
from urllib.request import urlopen
response = urlopen("https://raw.githubusercontent.com/actions/python-versions/c641695f6a07526c18f10e374e503e649fef9427/.gitignore")
data = response.read()
assert len(data) == 140, len(data)

10
tests/sources/tcltk.py Normal file
View File

@@ -0,0 +1,10 @@
import tkinter
import _tkinter
header = _tkinter.TK_VERSION
lib = tkinter.Tk().getvar('tk_version')
if lib != header:
print('header version=' + header)
print('lib version=' + lib)
exit(1)

File diff suppressed because it is too large Load Diff