I am trying to create a distribution .pex file to distribute my python (Flask) application with PEX .
If I have the following setting:
. |_ requirements.txt |_ app.py |_ module1 |_ module2
How can I pack this with pex?
I can set my requirements and run app.py with this:
pex -r requirements.txt -- app.py
But how can I also include my local modules in the pex distribution?
I tried:
pex -r requirements.txt -m module1 module2 -- app.py
and:
pex module1 module2 -r requirements.txt -- app.py
But get the error:
Failed to meet all requirements for module 1
If I completely leave my local modules:
pex -r requirements.txt -- ./app.py
I can not satisfy the requirements for (something in my request.txt field)
Did I miss something obvious here? Is this the wrong use case for PEX?
source share