Skip to content

Commit 0663025

Browse files
committed
unix: emit NEED_LIBRESSL/NEED_OPENSSL in Python
Reading the environment variable is a bit hacky. But it gets the job done.
1 parent 49e2750 commit 0663025

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

cpython-unix/Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ ifdef PYBUILD_MUSL
4444
PLATFORM := $(PLATFORM)-musl
4545
endif
4646

47-
ifdef PYBUILD_LIBRESSL
48-
NEED_LIBRESSL := 1
49-
NEED_OPENSSL :=
50-
else
51-
NEED_OPENSSL := 1
52-
NEED_LIBRESSL :=
53-
endif
54-
5547
# Always write out settings files.
5648
$(shell $(RUN_BUILD) placeholder_archive makefiles)
5749
include $(OUTDIR)/Makefile.$(TARGET_TRIPLE)

pythonbuild/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ def write_triples_makefiles(targets, dest_dir: pathlib.Path):
9494
for need in settings.get("needs", []):
9595
lines.append("NEED_%s := 1\n" % need.upper())
9696

97+
if "PYBUILD_LIBRESSL" in os.environ:
98+
lines.append("NEED_LIBRESSL := 1\n")
99+
else:
100+
lines.append("NEED_OPENSSL := 1\n")
101+
97102
write_if_different(makefile_path, "".join(lines).encode("ascii"))
98103

99104

0 commit comments

Comments
 (0)