Merge pull request #171 from akv-platform/v-sdolin/issue-402

Explicitly link brew tcl/tk
This commit is contained in:
Marko Zivic 2022-06-27 09:18:28 +02:00 committed by GitHub
commit 73379f970f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View File

@ -59,6 +59,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.*

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)