Repository navigation
|
Hi there, new to PEX! |
Answered by
jsirois
Jul 3, 2021
Replies: 2 comments 1 reply
|
You will only be able to do this with a For example, using $ cat src/exe.py
import subprocess
def main():
subprocess.check_call(["pytest", "--version"])
subprocess.check_call(["which", "pytest"])
$ pex pytest --venv prepend -o my.pex -D src -e exe:main
$ ./my.pex
pytest 6.2.4
/home/jsirois/.pex/venvs/efadb32f637132f9dc2de837e85c42205c95e130/2d1d404c3de23b1810386195be7410700b1feb14/bin/pytest |
1 reply
Answer selected by
ws1088
|
thx. I think another solution I found out from the web is to do |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will only be able to do this with a
--venvmode pex and the append or prepend option.For example, using
--venv prependwhich prepends all console scripts found in the PEX to the PATH: