You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have 3 files : requirements.txt, module1.py and module2.py
I need to bake a single shiv executable with all the dependencies specified inside requirements.txt and later I want to use the same shiv executable for running module1.py as well as module2.py
can we do something like:
bake shiv using shiv requirements.txt -o shiv.pyz
to run module1.py, export SHIV_ENTRY_POINT=module1:main and then ./shiv.pyz should run the module1 script
to run module2.py, export SHIV_ENTRY_POINT=module2:main and then ./shiv.pyz should run the module2 script
does this work? do we have any alternative to do that?
Thanks, Sudarshan
The text was updated successfully, but these errors were encountered:
A pyz created with shiv should work exactly as you describe. In fact, internally at LinkedIn we sometimes package multiple CLIs that share a set of dependencies this way. Another option is to use the pyz as the shebang for a script, like so:
Suppose I have 3 files : requirements.txt, module1.py and module2.py
I need to bake a single shiv executable with all the dependencies specified inside requirements.txt and later I want to use the same shiv executable for running module1.py as well as module2.py
can we do something like:
shiv requirements.txt -o shiv.pyz
export SHIV_ENTRY_POINT=module1:main
and then./shiv.pyz
should run the module1 scriptexport SHIV_ENTRY_POINT=module2:main
and then./shiv.pyz
should run the module2 scriptdoes this work? do we have any alternative to do that?
Thanks, Sudarshan
The text was updated successfully, but these errors were encountered: