Skip to content

Explicitly link brew tcl/tk #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions builders/macos-python-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down
7 changes: 7 additions & 0 deletions tests/python-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions tests/sources/tcltk.py
Original file line number Diff line number Diff line change
@@ -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)