Skip to content

Commit

Permalink
fix: workaround various SSL related issues using `JULIA_SSL_CA_ROOTS_…
Browse files Browse the repository at this point in the history
…PATH`
  • Loading branch information
sstroemer authored Feb 4, 2025
1 parent a5b5b17 commit c2024b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/iesopt/julia/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ def setup_julia():
# ssl._create_default_https_context = ssl._create_unverified_context
# logger.warn("Disabling SSL verification to prevent problems; this may be unsafe")

# Set `JULIA_SSL_CA_ROOTS_PATH` to prevent various SSL related issues (with Julia setup; LibGit2; etc.).
if "JULIA_SSL_CA_ROOTS_PATH" in os.environ:
logger.warn(
"Overwriting the env. variable `JULIA_SSL_CA_ROOTS_PATH` (current: `%s`) to prevent SSL issues during the Julia setup"
% str(os.environ["JULIA_SSL_CA_ROOTS_PATH"])
)
os.environ["JULIA_SSL_CA_ROOTS_PATH"] = ""

# Setup Julia (checking if it "looks" valid).
import juliapkg

Expand Down

0 comments on commit c2024b2

Please sign in to comment.