RFE: configure time search for python
We've been relying on the following in upcxx-run
:
#!/usr/bin/env python
That is fine as long as there is a python
in $PATH
.
However, FreeBSD has chosen to approach the Python2-EOL by providing a python3
and NOT a "bare" python
. I suspect there may be other (supported by us) systems where this approach is taken.
It should be possible to have configure
perform a more expansive search, including for python3
as well as a --with-python=...
. The she-bang line in upcxx-run
can easily be rewritten at installation time. The in-build-tree uses can be (approximately) $(UPCXX_PYTHON) $(TOPSRC)/utils/upcxx-run
to run the script without replacing the she-bang.
In the absence of this work, the failure mode is fairly straight-forward;
$ bin/upcxx-run -n1 -n2 ./hello.exe
env: python: No such file or directory
And the trivial fix is to append a 3
to the first line of the script.
Comments (2)
-
reporter -
reporter - changed status to resolved
Implement and document --with-python=
This commit provides
--with-python-...
allowing the user runningconfigure
with the ability to override the Python interpereter to be used. Logic has been added to ensure the in-build-tree and installedupcxx-run
script will both use the speficied interpreter.Additionally, the interpreter to be used (either user-specified or default) is now subjeted to a version check in
configure
.The logic in
upcxx-run
to perform a dynamic version check and to honor$UPCXX_PYTHON
have not been removed. This mechanism does still provide the means to deal with a post-configure change to$PATH
(or thepython
installation appearing in it).Resolves issue
#309→ <<cset d343da5710aa>>
- Log in to comment
Proposed implementation of
--with-python=...
(in lieu of the search described here) is in pull request 163