Skip to content

Commit

Permalink
Set PYTHONHOME in embedding test to fix compilation issues in Py3.8/m…
Browse files Browse the repository at this point in the history
…acOS.
  • Loading branch information
scoder committed Aug 11, 2020
1 parent 1b6ce69 commit a333d6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Demos/embed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
PYTHON := python
PYVERSION := $(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
PYPREFIX := $(shell $(PYTHON) -c "import sys; print(sys.prefix)")
PYTHONHOME := $(shell $(PYTHON) -c "import sys; print(sys.prefix + ':' + sys.exec_prefix)")

INCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")
PLATINCDIR := $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_python_inc(plat_specific=True))")
Expand All @@ -20,6 +21,7 @@ SYSLIBS := $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sy
paths:
@echo "PYTHON=$(PYTHON)"
@echo "PYVERSION=$(PYVERSION)"
@echo "PYTHONHOME=$(PYTHONHOME)"
@echo "PYPREFIX=$(PYPREFIX)"
@echo "INCDIR=$(INCDIR)"
@echo "PLATINCDIR=$(PLATINCDIR)"
Expand Down
1 change: 1 addition & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,7 @@ def test_embed(self):
subprocess.check_output([
"make",
"PYTHON='%s'" % sys.executable,
"PYTHONHOME=%s:%s" % (sys.prefix, sys.exec_prefix),
"CYTHON='%s'" % cython,
"LIBDIR1='%s'" % libdir,
"paths", "test",
Expand Down

0 comments on commit a333d6a

Please sign in to comment.