https://pantsbuild.org/ logo
#general
Title
# general
w

worried-salesclerk-37834

09/16/2021, 6:32 PM
Does running
pants run
happen inside of a pex? I'm getting an error when running the pex, but not via run. Hitting
NotADirectoryError: MultiplexedPath only supports directories
from
importlib_resources.files("my.dumb.package")
May have figured one part out. Since it's just a directory of files and import_lib requires the init file, you need both
resources
to add the non-python files and
python_lib
to include the init files. Script is coming back like it's not seeing any of the files, but no more errors, at least.
Open to any recommendations for getting a list of paths for a glob. I'm thinking
glob.glob
doesn't work in a zip.
e

enough-analyst-54434

09/16/2021, 7:25 PM
It doesn't, so just chose the unzip or venv execution mode for your PEX: https://www.pantsbuild.org/docs/reference-pex_binary#codeexecution_modecode
2 Views