Skip to content

Commit

Permalink
Additional Tcl search path
Browse files Browse the repository at this point in the history
I don't know if it's due to the GitHub macos-latest build runner image being
macos 14 or due to the update to Tcl 8.6.15, but the Tcl installation now
appears under /System/Library/Frameworks/Tcl.framework/Versions/, which we
weren't searching before, leading to build failures. Add this path to the
list of system Tcl paths to check. Hopefully this fixes the build 🤞.
  • Loading branch information
garfieldnate committed Dec 4, 2024
1 parent 1ef7aa2 commit 22d3f12
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions build_support/tcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,27 @@ def __get_brew_tcl_install_info_mac(env) -> Optional[TclInstallInfo]:


def __get_system_tcl_install_info_mac(env) -> Optional[TclInstallInfo]:
tcl_home = Path("/Library/Frameworks/Tcl.framework/Versions/Current")
install_info = TclInstallInfo(
home=tcl_home,
lib_dir=tcl_home,
include_dir=tcl_home / "Headers",
dyn_lib_name="Tcl",
include_lib_name="Tcl",
using_framework=True,
)
valid, msg = install_info.is_valid()
if not valid:
print(f"{env['INDENT']}System Tcl not found: {msg}")
return None
return install_info
valid = False
candidate_paths = [
Path("/Library/Frameworks/Tcl.framework/Versions/Current"),
Path("/System/Library/Frameworks/Tcl.framework/Versions/Current"),
]

for tcl_home in candidate_paths:
install_info = TclInstallInfo(
home=tcl_home,
lib_dir=tcl_home,
include_dir=tcl_home / "Headers",
dyn_lib_name="Tcl",
include_lib_name="Tcl",
using_framework=True,
)
valid, msg = install_info.is_valid()
if not valid:
print(f"{env['INDENT']}Candidate system Tcl not found: {msg}")
continue
return install_info
return None


def __prepare_for_compiling_with_tcl_mac(env, tcl_path_override, tcl_suffix):
Expand Down

0 comments on commit 22d3f12

Please sign in to comment.