include cert.pem for SSL verification in frozen builds and update build process to handle CA bundles
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user