Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion builders/macos-python-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ class macOSPythonBuilder : NixPythonBuilder {
.SYNOPSIS
Prepare system environment by installing dependencies and required packages.
#>

if ($this.Version -eq "3.7.17") {
# We have preinstalled ncurses and readLine on the hoster runners. But we need to install bzip2 for
# setting up an environemnt
# If we get any issues realted to ncurses or readline we can try to run this command
# brew install ncurses readline
Execute-Command -Command "brew install bzip2"
}
}

[void] Configure() {
Expand Down Expand Up @@ -74,7 +82,12 @@ class macOSPythonBuilder : NixPythonBuilder {

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'"
}
}

if ($this.Version -eq "3.7.17") {
$env:LDFLAGS += " -L$(brew --prefix bzip2)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix ncurses)/lib"
$env:CFLAGS += " -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(brew --prefix ncurses)/include"
}
}

### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
Expand Down
5 changes: 0 additions & 5 deletions tests/sources/python-modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,6 @@ def replace(lst, old, new):
'dataclasses',
])

if (sys.version_info.major, sys.version_info.minor, sys.version_info.micro) == (3, 7, 17):
standard_library.remove('bz2')
standard_library.remove('curses')
standard_library.remove('readline')

# 'macpath' module has been removed from Python 3.8
if sys.version_info > (3, 7):
standard_library.remove('macpath')
Expand Down