Skip to content

Commit

Permalink
Fixup py runner script (chapel-lang#23738)
Browse files Browse the repository at this point in the history
Something about the `-e` (debug mode) installation of the Python
bindings made them not always work from inside the Python Application.
This PR adjusts the installation to not use `-e` (meaning the
installation is in Python "release" mode rather than "debug" mode). As
part of this, I had to make the `replace` module be an actual folder
with an `__init__.py`, and list it in `setup.py`.

Reviewed by @jabraham17 -- thanks!
  • Loading branch information
DanilaFe authored Oct 30, 2023
2 parents 1b249d7 + e0a99bb commit 55e2546
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion third-party/chpl-venv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ chapel-py-venv: install-chpldeps
export VIRTUAL_ENV=$(CHPL_VENV_VIRTUALENV_DIR) && \
$(PIP) install --upgrade $(CHPL_PIP_INSTALL_PARAMS) $(LOCAL_PIP_FLAGS) \
--target $(CHPL_VENV_CHPLDEPS) \
-e $(CHPL_MAKE_HOME)/tools/chapel-py \
$(CHPL_MAKE_HOME)/tools/chapel-py \
-r $(CHPL_VENV_CHPLCHECK_REQUIREMENTS_FILE)

install-requirements: install-chpldeps
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions tools/chapel-py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@

setup(name = "chapel",
version = "0.1",
packages = ['chapel', 'chapel.replace'],
ext_modules = [Extension("chapel.core", ["chapel.cpp"], extra_compile_args = CXXFLAGS, extra_link_args=LDFLAGS)]
)
2 changes: 1 addition & 1 deletion util/config/run-in-venv-with-python-bindings.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CWD=$(cd $(dirname $0) ; pwd)
# Perform checks and set up environment variables for virtual env.
source $CWD/run-in-venv-common.bash

if [ ! -f "$chpldeps/chapel.egg-link" ]; then
if [ ! -d "$chpldeps/chapel" ]; then
echo "chapel python bindings not built - try make chapel-py-venv " 1>&2
exit 1
fi
Expand Down

0 comments on commit 55e2546

Please sign in to comment.