Does running `pants run` happen inside of a pex? I...
# general
w
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
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