mirror of
https://github.com/actions/python-versions.git
synced 2025-12-15 06:56:43 +00:00
Compare commits
27 Commits
3.9.0-beta
...
3.8.6-9669
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
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))'
|
||||
@@ -8,16 +8,6 @@ jobs:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
# We need this temporary step to have a consistent version of PowerShell on all images.
|
||||
- task: PowerShell@2
|
||||
displayName: 'Update PowerShell version for macOS'
|
||||
condition: eq(variables['Platform'], 'darwin')
|
||||
inputs:
|
||||
TargetType: inline
|
||||
script: |
|
||||
brew update
|
||||
brew cask upgrade powershell
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Build Python $(VERSION)'
|
||||
inputs:
|
||||
|
||||
@@ -50,7 +50,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR pyth
|
||||
|
||||
echo "Upgrading PIP..."
|
||||
./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"
|
||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
||||
|
||||
@@ -121,9 +121,14 @@ if ($LASTEXITCODE -ne 0) {
|
||||
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"
|
||||
$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"
|
||||
New-Item -ItemType File -Path $PythonVersionPath -Name "$Architecture.complete" | Out-Null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import distutils.sysconfig
|
||||
from distutils.version import StrictVersion
|
||||
from distutils.version import LooseVersion
|
||||
import sysconfig
|
||||
import sys
|
||||
import platform
|
||||
@@ -43,7 +43,7 @@ else:
|
||||
### Validate macOS
|
||||
if os_type == 'Darwin':
|
||||
### 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'
|
||||
ldflags = sysconfig.get_config_var('LDFLAGS')
|
||||
|
||||
|
||||
@@ -256,9 +256,10 @@ if sys.version_info > (3, 7):
|
||||
if sys.version_info > (3, 8):
|
||||
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):
|
||||
standard_library.remove('symbol')
|
||||
standard_library.remove('formatter')
|
||||
|
||||
# Remove tkinter and Easter eggs
|
||||
excluded_modules = [
|
||||
@@ -270,7 +271,6 @@ excluded_modules = [
|
||||
def check_missing_modules(expected_modules):
|
||||
missing = []
|
||||
for module in expected_modules:
|
||||
print('Try to import module ', module)
|
||||
try:
|
||||
importlib.import_module(module)
|
||||
except:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user