Add support for unstable Python versions (#38)

* Add support of unstable versions to package generation (#2)
* Add support of symver versions to Python setup scripts and tests

Co-authored-by: Maksim Petrov <47208721+vmapetr@users.noreply.github.com>
Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com>
Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
This commit is contained in:
MaksimZhukov
2020-07-15 13:13:21 +03:00
committed by GitHub
parent 67794a4d5f
commit 5c851d6172
17 changed files with 193 additions and 74 deletions

View File

@ -21,7 +21,7 @@ Required parameter. The platform for which Python will be built.
#>
param(
[Parameter (Mandatory=$true)][Version] $Version,
[Parameter (Mandatory=$true)][semver] $Version,
[Parameter (Mandatory=$true)][string] $Platform,
[string] $Architecture = "x64"
)
@ -29,6 +29,7 @@ param(
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "common-helpers.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "python-version.psm1") -DisableNameChecking
function Get-PythonBuilder {
<#
@ -49,13 +50,12 @@ function Get-PythonBuilder {
#>
param (
[version] $Version,
param(
[semver] $Version,
[string] $Architecture,
[string] $Platform
)
$Platform = $Platform.ToLower()
if ($Platform -match 'win32') {
$builder = [WinPythonBuilder]::New($Version, $Architecture, $Platform)
} elseif ($Platform -match 'linux') {
@ -71,5 +71,5 @@ function Get-PythonBuilder {
}
### Create Python builder instance, and build artifact
$Builder = Get-PythonBuilder -Version $Version -Architecture $Architecture -Platform $Platform
$Builder = Get-PythonBuilder -Version $Version -Architecture $Architecture -Platform $Platform
$Builder.Build()