mirror of
https://github.com/actions/python-versions.git
synced 2025-12-15 15:32:11 +00:00
Compare commits
38 Commits
3.1.4-8782
...
3.10.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd7c907270 | ||
|
|
8a3240d440 | ||
|
|
0da39d896f | ||
|
|
9fb025cb4b | ||
|
|
2c5eb53471 | ||
|
|
4a64b9faa7 | ||
|
|
f122228a65 | ||
|
|
de3f713ccc | ||
|
|
918fe6dc0f | ||
|
|
21af7aa4a5 | ||
|
|
39774a2eb7 | ||
|
|
5c48eb00d0 | ||
|
|
f102cb2a16 | ||
|
|
dc6698e2f1 | ||
|
|
50aa2873fc | ||
|
|
cf414aaddb | ||
|
|
139e1b9608 | ||
|
|
f4137da2f9 | ||
|
|
456c8c380c | ||
|
|
30a06d5828 | ||
|
|
d3614793c0 | ||
|
|
fab0879a3d | ||
|
|
105a61d2c8 | ||
|
|
9515b3b32a | ||
|
|
597694ec77 | ||
|
|
a6b76b25b6 | ||
|
|
3a4a0fd269 | ||
|
|
c4836579b7 | ||
|
|
ed01c1359f | ||
|
|
650a155a9a | ||
|
|
28d23216d1 | ||
|
|
6468490367 | ||
|
|
4be9a4cca1 | ||
|
|
89a619f4b9 | ||
|
|
ac42875cb8 | ||
|
|
280f63ac35 | ||
|
|
f85839ce0d | ||
|
|
594273ac16 |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @actions/virtual-environments-owners
|
||||||
34
.github/workflows/test-python-version.yml
vendored
Normal file
34
.github/workflows/test-python-version.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Test Python version
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Python version to build'
|
||||||
|
required: true
|
||||||
|
architecture:
|
||||||
|
description: 'The target architecture (x86, x64) of the Python'
|
||||||
|
required: false
|
||||||
|
default: 'x64'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-python:
|
||||||
|
name: Test Python ${{ github.event.inputs.version }} ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
|
||||||
|
steps:
|
||||||
|
- name: Setup Python ${{ github.event.inputs.version }}
|
||||||
|
uses: actions/setup-python@main
|
||||||
|
with:
|
||||||
|
python-version: ${{ github.event.inputs.version }}
|
||||||
|
architecture: ${{ github.event.inputs.architecture }}
|
||||||
|
|
||||||
|
- name: Validate version
|
||||||
|
run: |
|
||||||
|
python --version
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Run simple code
|
||||||
|
run: python -c 'import math; print(math.factorial(5))'
|
||||||
@@ -27,6 +27,7 @@ jobs:
|
|||||||
archiveFilePatterns: '$(Build.BinariesDirectory)/python-$(VERSION)-$(Platform)-$(Architecture).*'
|
archiveFilePatterns: '$(Build.BinariesDirectory)/python-$(VERSION)-$(Platform)-$(Architecture).*'
|
||||||
destinationFolder: $(Build.BinariesDirectory)
|
destinationFolder: $(Build.BinariesDirectory)
|
||||||
cleanDestinationFolder: false
|
cleanDestinationFolder: false
|
||||||
|
overwriteExistingFiles: true
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Apply build artifact to the local machines'
|
displayName: 'Apply build artifact to the local machines'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using module "./builders/win-python-builder.psm1"
|
using module "./win-python-builder.psm1"
|
||||||
using module "./builders/ubuntu-python-builder.psm1"
|
using module "./ubuntu-python-builder.psm1"
|
||||||
using module "./builders/macos-python-builder.psm1"
|
using module "./macos-python-builder.psm1"
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/nix-python-builder.psm1"
|
using module "./nix-python-builder.psm1"
|
||||||
|
|
||||||
class macOSPythonBuilder : NixPythonBuilder {
|
class macOSPythonBuilder : NixPythonBuilder {
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/python-builder.psm1"
|
using module "./python-builder.psm1"
|
||||||
|
|
||||||
class NixPythonBuilder : PythonBuilder {
|
class NixPythonBuilder : PythonBuilder {
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/nix-python-builder.psm1"
|
using module "./nix-python-builder.psm1"
|
||||||
|
|
||||||
class UbuntuPythonBuilder : NixPythonBuilder {
|
class UbuntuPythonBuilder : NixPythonBuilder {
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/python-builder.psm1"
|
using module "./python-builder.psm1"
|
||||||
|
|
||||||
class WinPythonBuilder : PythonBuilder {
|
class WinPythonBuilder : PythonBuilder {
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR pyth
|
|||||||
|
|
||||||
echo "Upgrading PIP..."
|
echo "Upgrading PIP..."
|
||||||
./python -m ensurepip
|
./python -m ensurepip
|
||||||
./python -m pip install --ignore-installed pip
|
./python -m pip install --ignore-installed pip --no-warn-script-location
|
||||||
|
|
||||||
echo "Create complete file"
|
echo "Create complete file"
|
||||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
||||||
|
|||||||
@@ -121,9 +121,14 @@ if ($LASTEXITCODE -ne 0) {
|
|||||||
Throw "Error happened during Python installation"
|
Throw "Error happened during Python installation"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host "Create `python3` symlink"
|
||||||
|
if ($MajorVersion -ne "2") {
|
||||||
|
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "Install and upgrade Pip"
|
Write-Host "Install and upgrade Pip"
|
||||||
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
|
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
|
||||||
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip"
|
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"
|
||||||
|
|
||||||
Write-Host "Create complete file"
|
Write-Host "Create complete file"
|
||||||
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null
|
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import distutils.sysconfig
|
import distutils.sysconfig
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import LooseVersion
|
||||||
import sysconfig
|
import sysconfig
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
@@ -43,7 +43,7 @@ else:
|
|||||||
### Validate macOS
|
### Validate macOS
|
||||||
if os_type == 'Darwin':
|
if os_type == 'Darwin':
|
||||||
### Validate openssl links
|
### Validate openssl links
|
||||||
if StrictVersion(nativeVersion) < StrictVersion("3.7.0"):
|
if LooseVersion(nativeVersion) < LooseVersion("3.7.0"):
|
||||||
expected_ldflags = '-L/usr/local/opt/openssl@1.1/lib'
|
expected_ldflags = '-L/usr/local/opt/openssl@1.1/lib'
|
||||||
ldflags = sysconfig.get_config_var('LDFLAGS')
|
ldflags = sysconfig.get_config_var('LDFLAGS')
|
||||||
|
|
||||||
|
|||||||
@@ -256,9 +256,10 @@ if sys.version_info > (3, 7):
|
|||||||
if sys.version_info > (3, 8):
|
if sys.version_info > (3, 8):
|
||||||
standard_library.remove('dummy_threading')
|
standard_library.remove('dummy_threading')
|
||||||
|
|
||||||
# 'symbol' module has been removed from Python 3.10
|
# 'symbol' and 'formatter' modules have been removed from Python 3.10
|
||||||
if sys.version_info >= (3, 10):
|
if sys.version_info >= (3, 10):
|
||||||
standard_library.remove('symbol')
|
standard_library.remove('symbol')
|
||||||
|
standard_library.remove('formatter')
|
||||||
|
|
||||||
# Remove tkinter and Easter eggs
|
# Remove tkinter and Easter eggs
|
||||||
excluded_modules = [
|
excluded_modules = [
|
||||||
@@ -270,7 +271,6 @@ excluded_modules = [
|
|||||||
def check_missing_modules(expected_modules):
|
def check_missing_modules(expected_modules):
|
||||||
missing = []
|
missing = []
|
||||||
for module in expected_modules:
|
for module in expected_modules:
|
||||||
print('Try to import module ', module)
|
|
||||||
try:
|
try:
|
||||||
importlib.import_module(module)
|
importlib.import_module(module)
|
||||||
except:
|
except:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user