Compare commits

...

98 Commits

Author SHA1 Message Date
Ray
ae7e50b370 Test registry path before invoking Get-ChildItem (#95) 2021-05-25 10:26:11 +03:00
Alena Sviridenko
7d36f506c4 Merge pull request #94 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 05/04/2021
2021-05-04 11:12:38 +03:00
Service account
f670a2adea Update versions-manifest 2021-05-04 08:10:58 +00:00
MaksimZhukov
505f65215c Merge pull request #93 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 04/29/2021
2021-04-29 15:40:40 +03:00
Service account
4598952486 Update versions-manifest 2021-04-29 12:38:53 +00:00
Alena Sviridenko
42bcd17332 [versions-manifest] Update for release from 04/19/2021 #92
[versions-manifest] Update for release from 04/19/2021
2021-04-19 11:13:43 +03:00
Service account
878244d959 Update versions-manifest 2021-04-19 08:01:02 +00:00
github-actions[bot]
42c2eea389 Update versions-manifest (#90)
Co-authored-by: Service account <no-reply@microsoft.com>
2021-04-08 15:23:08 +03:00
MaksimZhukov
493c59469e Merge pull request #89 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 04/07/2021
2021-04-07 18:56:08 +03:00
Service account
bd93b9d693 Update versions-manifest 2021-04-07 14:58:50 +00:00
MaksimZhukov
d0e5494ee2 Merge pull request #88 from actions/v-mazhuk/skip-alpha-beta
Ignore tkinter module for alpha & beta versions of Pyrhon 3.10.0
2021-04-07 17:40:08 +03:00
MaksimZhukov
0601c2bfde Fix condition 2021-04-07 16:53:52 +03:00
MaksimZhukov
4eb1751819 Update condition to skip all alpha and beta python versions for 3.10.0 2021-04-07 15:50:08 +03:00
MaksimZhukov
54aba042fd Merge pull request #87 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 04/04/2021
2021-04-05 00:21:06 +03:00
Service account
31ab2bc9f8 Update versions-manifest 2021-04-04 21:12:41 +00:00
Alena Sviridenko
5f4f86cc5e Merge pull request #86 from actions/update-versions-manifest-file 2021-04-04 08:03:09 +03:00
Service account
8ea13d774e Update versions-manifest 2021-04-03 23:22:19 +00:00
github-actions[bot]
afecc6a8b9 Update versions-manifest (#85)
Co-authored-by: Service account <no-reply@microsoft.com>
2021-03-10 18:51:43 +03:00
Alena Sviridenko
f4b22cc454 Ignore tkinter build fail for 3.10.0-alpha.6 #84
Ignore tkinter build fail for 3.10.0-alpha.6
2021-03-10 11:21:11 +03:00
Sergey Dolin
281024aec4 Skip tkinter failed build for alpha.6 2021-03-09 12:48:12 +05:00
github-actions[bot]
17b1cd02ca Update versions-manifest (#83)
Co-authored-by: Service account <no-reply@microsoft.com>
2021-02-20 10:54:47 +03:00
MaksimZhukov
33a76c361a Merge pull request #82 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 02/16/2021
2021-02-16 15:47:39 +03:00
Service account
371f79b70a Update versions-manifest 2021-02-16 12:20:03 +00:00
MaksimZhukov
3b961aaf4b Merge pull request #81 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 02/04/2021
2021-02-04 20:32:52 +03:00
Service account
e67096ebd1 Update versions-manifest 2021-02-04 12:52:56 +00:00
MaksimZhukov
bd7c907270 Merge pull request #80 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 01/27/2021
2021-01-27 15:52:45 +03:00
Service account
8a3240d440 Update versions-manifest 2021-01-27 12:15:12 +00:00
MaksimZhukov
0da39d896f Merge pull request #79 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 01/26/2021
2021-01-26 18:38:27 +03:00
Service account
9fb025cb4b Update versions-manifest 2021-01-26 08:25:00 +00:00
MaksimZhukov
2c5eb53471 Merge pull request #78 from vsafonkin/v-vlsafo/windows-python3-symlink
Add symlink `python3`
2021-01-25 12:27:40 +03:00
Vladimir Safonkin
4a64b9faa7 Remove test changes in manifest 2021-01-22 11:01:41 +03:00
Vladimir Safonkin
f122228a65 Update manifest 2021-01-21 16:17:21 +03:00
Vladimir Safonkin
de3f713ccc Create python3 symlink on Windows 2021-01-21 11:02:09 +03:00
Maxim Lobanov
918fe6dc0f Create CODEOWNERS (#75)
* Create CODEOWNERS

* Update CODEOWNERS
2021-01-20 21:38:34 +03:00
MaksimZhukov
21af7aa4a5 Merge pull request #77 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 01/13/2021
2021-01-13 13:44:09 +03:00
Service account
39774a2eb7 Update versions-manifest 2021-01-13 09:34:15 +00:00
MaksimZhukov
5c48eb00d0 Merge pull request #76 from dmitry-shibanov/v-dmshib/fix-warning-location
Add flag to skip warnings location of pip
2021-01-13 10:54:39 +03:00
Dmitry Shibanov
f102cb2a16 add flag to skip warnings of location of pip 2021-01-11 11:29:39 +03:00
github-actions[bot]
dc6698e2f1 Update versions-manifest (#74)
Co-authored-by: Service account <no-reply@microsoft.com>
2021-01-06 12:04:57 +03:00
MaksimZhukov
50aa2873fc Merge pull request #73 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 12/22/2020
2020-12-22 10:11:27 +03:00
MaksimZhukov
cf414aaddb Merge pull request #72 from actions/v-mazhuk/fix-cask-issue
Remove the temporary step with PowerShell version upgrade
2020-12-22 10:11:16 +03:00
Service account
139e1b9608 Update versions-manifest 2020-12-22 01:06:28 +00:00
MaksimZhukov
f4137da2f9 Remove temporary step 2020-12-22 03:41:24 +03:00
MaksimZhukov
456c8c380c Update the brew upgrade command 2020-12-22 03:38:12 +03:00
MaksimZhukov
30a06d5828 Merge pull request #71 from actions/v-mazhuk/add-test-workflow
Add a new workflow to test Python versions
2020-12-16 09:23:36 +03:00
MaksimZhukov
d3614793c0 Add a new workflow to test Python versions 2020-12-15 17:31:08 +03:00
MaksimZhukov
fab0879a3d Merge pull request #70 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 12/15/2020
2020-12-15 11:48:07 +03:00
Service account
105a61d2c8 Update versions-manifest 2020-12-15 08:12:39 +00:00
MaksimZhukov
9515b3b32a Merge pull request #68 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 12/10/2020
2020-12-10 12:53:39 +03:00
Service account
597694ec77 Update versions-manifest 2020-12-10 09:25:34 +00:00
MaksimZhukov
a6b76b25b6 Merge pull request #69 from actions/v-mazhuk/fix-python-3.10
Update the list of modules in tests for Python 3.10
2020-12-10 12:05:36 +03:00
MaksimZhukov
3a4a0fd269 Update the list of modules in tests for Python 3.10 2020-12-10 11:45:28 +03:00
MaksimZhukov
c4836579b7 Merge pull request #65 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 11/27/2020
2020-11-30 13:33:41 +03:00
Service account
ed01c1359f Update versions-manifest 2020-11-27 08:24:08 +00:00
MaksimZhukov
650a155a9a Merge pull request #66 from dmitry-shibanov/v-dmshib/fix-StrictVersion
Replace StrictVersion to LooseVersion
2020-11-25 19:14:54 +03:00
Dmitry Shibanov
28d23216d1 Update python-config-test.py 2020-11-24 22:41:59 +03:00
MaksimZhukov
6468490367 Merge pull request #64 from actions/v-mazhuk/fix-powerhell-issue-with-paths
Fix PowerShell issue with relative paths
2020-11-23 17:35:28 +03:00
MaksimZhukov
4be9a4cca1 Update overwriteExistingFiles input 2020-11-23 16:47:07 +03:00
MaksimZhukov
89a619f4b9 Fix PowerShell issue with relative paths 2020-11-23 13:29:46 +03:00
MaksimZhukov
ac42875cb8 Merge pull request #63 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 11/09/2020
2020-11-09 16:00:27 +03:00
Service account
280f63ac35 Update versions-manifest 2020-11-09 12:34:15 +00:00
MaksimZhukov
f85839ce0d Merge pull request #62 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 11/04/2020
2020-11-06 09:35:07 +03:00
Service account
594273ac16 Update versions-manifest 2020-11-04 17:39:24 +00:00
MaksimZhukov
bc57fd3c5f Merge pull request #59 from actions/update-versions-manifest-file
[versions-manifest] Build main Python versions with 1.1 version of openssl
2020-10-29 15:51:35 +03:00
Service account
a887886318 Update versions-manifest 2020-10-29 08:58:36 +00:00
Dmitry Shibanov
ff4ca0b2e5 skip test for python 2 (#60)
Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com>
2020-10-29 10:39:08 +03:00
MaksimZhukov
0b6a06284d Merge pull request #58 from dmitry-shibanov/v-dmshib/rebuild-python-openssl
Change version of openssl for python building.
2020-10-28 15:17:45 +03:00
Dmitry Shibanov
50e47adc8b remove debug lines 2020-10-27 11:56:49 +03:00
Dmitry Shibanov
99a84463ad revert test changes 2020-10-27 11:45:49 +03:00
Dmitry Shibanov
a7aea91c95 change links 2020-10-21 19:18:35 +03:00
Dmitry Shibanov
cdd1351989 change to static path 2020-10-21 15:55:45 +03:00
Dmitry Shibanov
2aa5c75cf9 change connection 2020-10-21 10:58:28 +03:00
Dmitry Shibanov
13b26039fa add fix to confirm uninstalling 2020-10-20 15:47:44 +03:00
Dmitry Shibanov
aa8915507a add new openssl 2020-10-20 13:12:41 +03:00
MaksimZhukov
57bf4da3a5 Merge pull request #57 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 10/14/2020
2020-10-14 12:06:42 +03:00
Service account
085cf7607e Update versions-manifest 2020-10-14 08:52:18 +00:00
MaksimZhukov
ae06e9c90f Merge pull request #56 from dmitry-shibanov/v-dmshib/exclude-symbol-from3.10
Exclude symbol module from python 3.10 and higher.
2020-10-14 11:27:17 +03:00
Dmitry Shibanov
c4030498aa add version compare 2020-10-13 19:56:27 +03:00
Dmitry Shibanov
6701f7c8b0 add new exclude 2020-10-13 16:42:04 +03:00
github-actions[bot]
1430296346 Add 3.9.0 (#55)
Co-authored-by: Service account <no-reply@microsoft.com>
2020-10-06 15:48:59 +03:00
MaksimZhukov
abc7af4881 Merge pull request #54 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/24/2020
2020-09-25 11:21:23 +03:00
Service account
c2464b5d82 Update versions-manifest 2020-09-24 12:26:29 +00:00
MaksimZhukov
ff07bfffbb Merge pull request #53 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/21/2020
2020-09-21 18:06:30 +03:00
Service account
46856eea96 Update versions-manifest 2020-09-21 14:48:39 +00:00
MaksimZhukov
1c92aa7fd8 Merge pull request #52 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 09/07/2020
2020-09-07 12:22:42 +03:00
Service account
4e23e7ccf5 Update versions-manifest 2020-09-07 09:07:48 +00:00
MaksimZhukov
e643db6cb1 Merge pull request #50 from actions/v-mazhuk/move-release-creation-to-github-actions
Move release and PR creation to GitHub Actions
2020-08-28 18:01:59 +03:00
MaksimZhukov
15099a8cbe Add link to the created PR 2020-08-28 15:24:47 +03:00
MaksimZhukov
a3078ebf0c Move release and PR creation to the GitHub Actions 2020-08-28 14:14:38 +03:00
MaksimZhukov
87b41b829e Merge pull request #47 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 08/18/2020
2020-08-18 16:40:37 +03:00
Service account
b41aabd79c Update versions-manifest based on build from 20200818.1 2020-08-18 13:25:10 +00:00
MaksimZhukov
ca3edf5446 Merge pull request #46 from actions/update-versions-manifest-file
[versions-manifest] Update for release from 08/12/2020
2020-08-12 12:55:08 +03:00
Service account
04b0679602 Update versions-manifest based on build from 20200812.1 2020-08-12 08:45:37 +00:00
MaksimZhukov
6204b3717e Update Git submodule (#45)
Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com>
2020-07-30 14:22:24 +03:00
Maxim Lobanov
d20146a86c Update versions-manifest.json 2020-07-28 22:12:47 +03:00
MaksimZhukov
4df41f4916 Update versions-manifest based on build from 20200721.2 (#44)
Co-authored-by: Service account <no-reply@microsoft.com>
2020-07-24 14:15:21 +03:00
MaksimZhukov
636e550e78 Update versions-manifest based on build from 20200721.2 (#43)
Co-authored-by: Service account <no-reply@microsoft.com>
2020-07-21 16:04:40 +03:00
MaksimZhukov
bbbf87f2cf Update versions-manifest based on build from 20200715.1 (#42)
Co-authored-by: Service account <no-reply@microsoft.com>
2020-07-17 16:45:08 +03:00
20 changed files with 1831 additions and 182 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @actions/virtual-environments-owners

33
.github/workflows/create-pr.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Create Pull Request
on:
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
create_pr:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Create versions-manifest.json
run: |
./helpers/packages-generation/manifest-generator.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" `
-GitHubAccessToken "${{secrets.GITHUB_TOKEN}}" `
-OutputFile "./versions-manifest.json" `
-ConfigurationFile "./config/python-manifest-config.json"
- name: Create GitHub PR
run: |
$formattedDate = Get-Date -Format "MM/dd/yyyy"
./helpers/github/create-pull-request.ps1 `
-RepositoryFullName "$env:GITHUB_REPOSITORY" `
-AccessToken "${{secrets.GITHUB_TOKEN}}" `
-BranchName "update-versions-manifest-file" `
-CommitMessage "Update versions-manifest" `
-PullRequestTitle "[versions-manifest] Update for release from ${formattedDate}" `
-PullRequestBody "Update versions-manifest.json for release from ${formattedDate}"

18
.github/workflows/create-release.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Create release
on:
repository_dispatch:
types: [create-release]
jobs:
create_release:
name: Create release ${{ github.event.client_payload.ToolVersion }}
runs-on: ubuntu-latest
steps:
- name: Create release for Python ${{ github.event.client_payload.ToolVersion }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.client_payload.TagName }}
release_name: ${{ github.event.client_payload.ToolVersion }}
body: ${{ github.event.client_payload.ReleaseBody }}

View 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))'

View File

@@ -116,3 +116,17 @@ stages:
Architecture: x86
jobs:
- template: /azure-pipelines/templates/test-job.yml
- stage: Publish_Release
dependsOn: [Test_Python_MacOS, Test_Python_Ubuntu_1604, Test_Python_Ubuntu_1804, Test_Python_Ubuntu_2004, Test_Python_x64_Windows, Test_Python_x86_Windows]
jobs:
- deployment: Publish_Release
pool:
name: Azure Pipelines
vmImage: ubuntu-18.04
environment: 'Get Available Tools Versions - Publishing Approval'
strategy:
runOnce:
deploy:
steps:
- template: /azure-pipelines/templates/publish-release-steps.yml

View File

@@ -0,0 +1,47 @@
steps:
- download: none
- checkout: self
submodules: true
- task: DownloadPipelineArtifact@2
inputs:
source: 'current'
path: $(Build.BinariesDirectory)
- task: PowerShell@2
displayName: 'Create release Python $(VERSION)'
inputs:
TargetType: inline
script: |
$tagName = "$(VERSION)-$(Build.BuildId)"
$releaseBody = "Python $(VERSION)"
./helpers/github/create-release.ps1 -RepositoryFullName "$(Build.Repository.Name)" `
-AccessToken "$(GITHUB_TOKEN)" `
-ToolVersion "$(VERSION)" `
-TagName "$tagName" `
-ReleaseBody "$releaseBody" `
-EventType "$(EVENT_TYPE)"
- task: GitHubRelease@1
displayName: 'Upload release assets'
inputs:
gitHubConnection: 'Github Connection'
action: edit
tag: '$(VERSION)-$(Build.BuildId)'
title: '$(VERSION)'
releaseNotesSource: inline
releaseNotesInline: '$(RELEASE_NOTES_CONTENT)'
assets: '$(Build.BinariesDirectory)/*/*'
assetUploadMode: replace
addChangeLog: false
- task: PowerShell@2
displayName: 'Trigger "Create Pull Request" workflow'
inputs:
TargetType: inline
script: |
Import-Module (Join-Path (Get-Location).Path "github-api.psm1")
$gitHubApi = Get-GitHubApi -RepositoryFullName "$(Build.Repository.Name)" -AccessToken "$(GITHUB_TOKEN)"
$gitHubApi.CreateWorkflowDispatch("$(WORKFLOW_FILE_NAME)", "$(WORKFLOW_DISPATCH_REF)", "$(INPUTS)")
Write-Host "Please find created Pull request here: $(Build.Repository.Uri)/pulls"
workingDirectory: '$(Build.SourcesDirectory)/helpers/github'

View File

@@ -27,6 +27,7 @@ jobs:
archiveFilePatterns: '$(Build.BinariesDirectory)/python-$(VERSION)-$(Platform)-$(Architecture).*'
destinationFolder: $(Build.BinariesDirectory)
cleanDestinationFolder: false
overwriteExistingFiles: true
- task: PowerShell@2
displayName: 'Apply build artifact to the local machines'

View File

@@ -1,6 +1,6 @@
using module "./builders/win-python-builder.psm1"
using module "./builders/ubuntu-python-builder.psm1"
using module "./builders/macos-python-builder.psm1"
using module "./win-python-builder.psm1"
using module "./ubuntu-python-builder.psm1"
using module "./macos-python-builder.psm1"
<#
.SYNOPSIS

View File

@@ -1,4 +1,4 @@
using module "./builders/nix-python-builder.psm1"
using module "./nix-python-builder.psm1"
class macOSPythonBuilder : NixPythonBuilder {
<#
@@ -40,10 +40,10 @@ class macOSPythonBuilder : NixPythonBuilder {
### and then add the appropriate paths for the header and library files to configure command.
### Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
if ($this.Version -lt "3.7.0") {
$env:LDFLAGS = "-L$(brew --prefix openssl)/lib"
$env:CFLAGS = "-I$(brew --prefix openssl)/include"
$env:LDFLAGS = "-L/usr/local/opt/openssl@1.1/lib"
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include"
} else {
$configureString += " --with-openssl=/usr/local/opt/openssl"
$configureString += " --with-openssl=/usr/local/opt/openssl@1.1"
}
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*

View File

@@ -1,4 +1,4 @@
using module "./builders/python-builder.psm1"
using module "./python-builder.psm1"
class NixPythonBuilder : PythonBuilder {
<#

View File

@@ -1,4 +1,4 @@
using module "./builders/nix-python-builder.psm1"
using module "./nix-python-builder.psm1"
class UbuntuPythonBuilder : NixPythonBuilder {
<#

View File

@@ -1,4 +1,4 @@
using module "./builders/python-builder.psm1"
using module "./python-builder.psm1"
class WinPythonBuilder : PythonBuilder {
<#

Submodule helpers updated: 1069e7a4ec...f8f76caff1

View File

@@ -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

View File

@@ -28,16 +28,20 @@ function Remove-RegistryEntries {
$versionFilter = Get-RegistryVersionFilter -Architecture $Architecture -MajorVersion $MajorVersion -MinorVersion $MinorVersion
$regPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products"
$regKeys = Get-ChildItem -Path Registry::$regPath -Recurse | Where-Object Property -Ccontains DisplayName
foreach ($key in $regKeys) {
if ($key.getValue("DisplayName") -match $versionFilter) {
Remove-Item -Path $key.PSParentPath -Recurse -Force -Verbose
if (Test-Path -Path Registry::$regPath) {
$regKeys = Get-ChildItem -Path Registry::$regPath -Recurse | Where-Object Property -Ccontains DisplayName
foreach ($key in $regKeys) {
if ($key.getValue("DisplayName") -match $versionFilter) {
Remove-Item -Path $key.PSParentPath -Recurse -Force -Verbose
}
}
}
$regPath = "HKEY_CLASSES_ROOT\Installer\Products"
Get-ChildItem -Path Registry::$regPath | Where-Object { $_.GetValue("ProductName") -match $versionFilter } | ForEach-Object {
Remove-Item Registry::$_ -Recurse -Force -Verbose
if (Test-Path -Path Registry::$regPath) {
Get-ChildItem -Path Registry::$regPath | Where-Object { $_.GetValue("ProductName") -match $versionFilter } | ForEach-Object {
Remove-Item Registry::$_ -Recurse -Force -Verbose
}
}
$uninstallRegistrySections = @(
@@ -121,9 +125,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

View File

@@ -7,6 +7,7 @@ param (
Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1")
Import-Module (Join-Path $PSScriptRoot "../helpers/common-helpers.psm1")
Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1")
function Analyze-MissingModules([string] $buildOutputLocation) {
$searchStringStart = "Failed to build these modules:"
@@ -20,9 +21,14 @@ function Analyze-MissingModules([string] $buildOutputLocation) {
$regexMatch = [regex]::match($SplitBuiltOutput, $Pattern)
if ($regexMatch.Success)
{
$module = $regexMatch.Groups[1].Value.Trim()
Write-Host "Failed missing modules:"
Write-Host $regexMatch.Groups[1].Value
return 1
Write-Host $module
if ( ($module -eq "_tkinter") -and ( ($Version -like "3.10.0-beta*") -or ($Version -like "3.10.0-alpha*") ) ) {
Write-Host "$module $Version ignored"
} else {
return 1
}
}
return 0
@@ -47,6 +53,11 @@ Describe "Tests" {
}
}
It "Run pip" {
"pip install requests" | Should -ReturnZeroExitCode
"pip uninstall requests -y" | Should -ReturnZeroExitCode
}
if (IsNixPlatform $Platform) {
It "Check for failed modules in build_output" {
@@ -59,7 +70,8 @@ Describe "Tests" {
}
It "Check if python configuration is correct" {
"python ./sources/python-config-test.py $Version" | Should -ReturnZeroExitCode
$nativeVersion = Convert-Version -version $Version
"python ./sources/python-config-test.py $Version $nativeVersion" | Should -ReturnZeroExitCode
}
It "Check if shared libraries are linked correctly" {
@@ -68,7 +80,7 @@ Describe "Tests" {
}
# Pyinstaller 3.5 does not support Python 3.8.0. Check issue https://github.com/pyinstaller/pyinstaller/issues/4311
if ($Version -lt "3.8.0") {
if ($Version -lt "3.8.0" -and $Version.Major -ne "2") {
It "Validate Pyinstaller" {
"pip install pyinstaller" | Should -ReturnZeroExitCode
"pyinstaller --onefile ./sources/simple-test.py" | Should -ReturnZeroExitCode

View File

@@ -1,4 +1,5 @@
import distutils.sysconfig
from distutils.version import LooseVersion
import sysconfig
import sys
import platform
@@ -7,6 +8,7 @@ import os
# Define variables
os_type = platform.system()
version = sys.argv[1]
nativeVersion = sys.argv[2]
lib_dir_path = sysconfig.get_config_var('LIBDIR')
ld_library_name = sysconfig.get_config_var('LDLIBRARY')
@@ -41,7 +43,7 @@ else:
### Validate macOS
if os_type == 'Darwin':
### Validate openssl links
if version < "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')
@@ -49,8 +51,8 @@ if os_type == 'Darwin':
print('Invalid ldflags: %s; Expected: %s' % (ldflags, expected_ldflags))
exit(1)
else:
expected_openssl_includes = '-I/usr/local/opt/openssl/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl/lib'
expected_openssl_includes = '-I/usr/local/opt/openssl@1.1/include'
expected_openssl_ldflags ='-L/usr/local/opt/openssl@1.1/lib'
openssl_includes = sysconfig.get_config_var('OPENSSL_INCLUDES')
openssl_ldflags = sysconfig.get_config_var('OPENSSL_LDFLAGS')

View File

@@ -139,6 +139,7 @@ standard_library = [
'sre_constants',
'sre_parse',
'ssl',
'_ssl',
'stat',
'string',
'stringprep',
@@ -255,6 +256,11 @@ if sys.version_info > (3, 7):
if sys.version_info > (3, 8):
standard_library.remove('dummy_threading')
# '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 = [
'antigravity',
@@ -265,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