include cert.pem for SSL verification in frozen builds and update build process to handle CA bundles

This commit is contained in:
Ross
2025-11-24 15:30:48 +00:00
parent 84d18f25e1
commit 377be258de
4 changed files with 100 additions and 5 deletions
+8
View File
@@ -117,6 +117,14 @@ def build(build: bool = True, copy: bool = True, test: bool = False, dest: str |
name_used = f"{base_name}_{ts}"
print(f"Previous artifact appears locked; building as {name_used} to avoid PermissionError")
# Ensure cert.pem is included for test builds as well (if present)
cert_path = project_root / "cert.pem"
if cert_path.exists():
arg = f"{str(cert_path)};."
# Avoid adding duplicate entries
if arg not in add_data_args:
add_data_args += ["--add-data", arg]
PyInstaller.__main__.run([
str(project_root / "nice.py"),
"--onefile",