Compare commits

...

14 Commits

Author SHA1 Message Date
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
5 changed files with 121 additions and 10 deletions

View File

@@ -7,6 +7,10 @@ class macOSPythonBuilder : NixPythonBuilder {
.DESCRIPTION
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
The full name of platform for which Python should be built.
@@ -46,9 +50,10 @@ class macOSPythonBuilder : NixPythonBuilder {
### 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.
if ($this.Version -ge "3.8.10" -and $this.Version -ne "3.9.0" ) {
$configureString += " --enable-universalsdk --with-universal-archs=universal2"
}
### 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.
### Solution is to install these libraries from a third-party package manager,
@@ -59,6 +64,9 @@ class macOSPythonBuilder : NixPythonBuilder {
$env:CFLAGS = "-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include"
} else {
$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.*
@@ -70,6 +78,9 @@ class macOSPythonBuilder : NixPythonBuilder {
$env:CPPFLAGS += "-I$(brew --prefix sqlite3)/include"
}
Write-Host "The passed configure options are: "
Write-Host $configureString
Execute-Command -Command $configureString
}
}

View File

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

View File

@@ -49,6 +49,13 @@ Describe "Tests" {
"python ./sources/simple-test.py" | Should -ReturnZeroExitCode
}
# 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 -not ([semver]"$($Version.Major).$($Version.Minor)" -eq [semver]"3.11" -and $Version.PreReleaseLabel)) {
It "Check if sqlite3 module is installed" {
"python ./sources/python-sqlite3.py" | Should -ReturnZeroExitCode

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)

View File

@@ -410,49 +410,95 @@
}
]
},
{
"version": "3.10.5",
"stable": true,
"release_url": "https://github.com/actions/python-versions/releases/tag/3.10.5-2452607758",
"files": [
{
"filename": "python-3.10.5-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-darwin-x64.tar.gz"
},
{
"filename": "python-3.10.5-linux-18.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "18.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-linux-18.04-x64.tar.gz"
},
{
"filename": "python-3.10.5-linux-20.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "20.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-linux-20.04-x64.tar.gz"
},
{
"filename": "python-3.10.5-linux-22.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "22.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-linux-22.04-x64.tar.gz"
},
{
"filename": "python-3.10.5-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-win32-x64.zip"
},
{
"filename": "python-3.10.5-win32-x86.zip",
"arch": "x86",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-win32-x86.zip"
}
]
},
{
"version": "3.10.4",
"stable": true,
"release_url": "https://github.com/actions/python-versions/releases/tag/3.10.4-2268648287",
"release_url": "https://github.com/actions/python-versions/releases/tag/3.10.4-2447350680",
"files": [
{
"filename": "python-3.10.4-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-darwin-x64.tar.gz"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-darwin-x64.tar.gz"
},
{
"filename": "python-3.10.4-linux-18.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "18.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-linux-18.04-x64.tar.gz"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-linux-18.04-x64.tar.gz"
},
{
"filename": "python-3.10.4-linux-20.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "20.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-linux-20.04-x64.tar.gz"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-linux-20.04-x64.tar.gz"
},
{
"filename": "python-3.10.4-linux-22.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "22.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-linux-22.04-x64.tar.gz"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-linux-22.04-x64.tar.gz"
},
{
"filename": "python-3.10.4-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-win32-x64.zip"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-win32-x64.zip"
},
{
"filename": "python-3.10.4-win32-x86.zip",
"arch": "x86",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2268648287/python-3.10.4-win32-x86.zip"
"download_url": "https://github.com/actions/python-versions/releases/download/3.10.4-2447350680/python-3.10.4-win32-x86.zip"
}
]
},
@@ -2067,6 +2113,40 @@
}
]
},
{
"version": "3.8.13",
"stable": true,
"release_url": "https://github.com/actions/python-versions/releases/tag/3.8.13-2529578966",
"files": [
{
"filename": "python-3.8.13-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/python-versions/releases/download/3.8.13-2529578966/python-3.8.13-darwin-x64.tar.gz"
},
{
"filename": "python-3.8.13-linux-18.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "18.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.8.13-2529578966/python-3.8.13-linux-18.04-x64.tar.gz"
},
{
"filename": "python-3.8.13-linux-20.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "20.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.8.13-2529578966/python-3.8.13-linux-20.04-x64.tar.gz"
},
{
"filename": "python-3.8.13-linux-22.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "22.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.8.13-2529578966/python-3.8.13-linux-22.04-x64.tar.gz"
}
]
},
{
"version": "3.8.12",
"stable": true,