Skip to content

Commit 2ce4d90

Browse files
committed
Fix building go on MacOS Tahoe 26 and attempt to fix superset python env
1 parent 9280a69 commit 2ce4d90

5 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎go_server/main‎

-4.3 KB
Binary file not shown.

‎pythonCode/modules/superset/SupersetEnvManager.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,20 @@ def is_package_installed(self, package_name, installed_packages=None):
129129

130130
def install_requirements(self):
131131
"""Install packages in the environment"""
132+
# Upgrade pip, setuptools and wheel first to ensure we can install binary wheels
133+
try:
134+
subprocess.run(
135+
[str(self.env_path), "-m", "pip", "install", "--upgrade", "pip", "setuptools", "wheel"],
136+
check=True,
137+
capture_output=True,
138+
text=True
139+
)
140+
except subprocess.CalledProcessError as e:
141+
print(f"Warning: Failed to upgrade pip/setuptools/wheel: {e.stderr}")
142+
132143
# Build install command
133-
install_cmd = [str(self.env_path), "-m", "pip", "install"]
144+
# Use --prefer-binary to avoid compiling from source if possible (fixes issues on machines without build tools)
145+
install_cmd = [str(self.env_path), "-m", "pip", "install", "--prefer-binary"]
134146

135147
for requirement in SUPERSET_PACKAGES:
136148
if isinstance(requirement, dict):

‎utilScripts/go_build.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parent_folder=$(dirname "$0")
22

33
cd go_server
4-
go build main.go
4+
CGO_ENABLED=0 go build main.go
55
cd ..
66
echo "Go server built successfully."

‎utilScripts/pack_GO.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cd go_server
2-
go build main.go
2+
CGO_ENABLED=0 go build main.go
33
cd ..
44
echo F | cp go_server/main renderer/public/server_go
55
echo F | cp go_server/main resources/server_go

‎utilScripts/pack_GO_mac.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cd go_server
2-
go build main.go
2+
CGO_ENABLED=0 go build main.go
33
cd ..
44
echo F | cp -p go_server/main renderer/public/server_go
55
echo F | cp -p go_server/main go_executables/server_go

0 commit comments

Comments
 (0)