elegant-florist-94385
08/07/2024, 8:13 PMRUN PEX_TOOLS=1 python ./app.deps.pex/ venv --scope=deps --compile /bin/app
is failing with
received exit code 1 during execution of `['/usr/local/python/bin/python3.12', '-s', '-E', '-m', 'venv', '--without-pip', '/bin/app']` while trying to execute `['/usr/local/python/bin/python3.12', '-s', '-E', '-m', 'venv', '--without-pip', '/bin/app']`
and I can't figure out how to debug it further. (Not sure if its a pex issue or a pants issue)
I've tried leaving running this command myself directly in the container, and it just gives the same error with no more information.
Any suggestions for debugging?wide-midnight-78598
08/07/2024, 8:18 PMwide-midnight-78598
08/07/2024, 8:19 PM./app.deps.pex/
Generally, what you're doing looks okay - but would have to see the rest of the BUILD file to knowelegant-florist-94385
08/07/2024, 8:29 PMdef split_pex_binary(entry_point: str, **kwargs):
name = entry_point
if entry_point.endswith('_entry.py'):
name = entry_point[:-9]
pex_binary(
name=f"{name}.deps",
entry_point=entry_point,
execution_mode="venv",
layout="packed",
include_sources=False,
include_tools=True,
)
pex_binary(
name=f"{name}.srcs",
entry_point=entry_point,
execution_mode="venv",
layout="packed",
include_requirements=False,
include_tools=True,
)
generating pex binaries like this, and sure enough, this is generating blahblahblah.pex
directories (not files)wide-midnight-78598
08/07/2024, 8:30 PMelegant-florist-94385
08/07/2024, 8:33 PM__main__.py
files and seem to be okay.
Also tried removing the execution mode and layout, and it did indeed build executable zipfiles again, but it still led to the same errorwide-midnight-78598
08/07/2024, 8:34 PMwide-midnight-78598
08/07/2024, 8:37 PMlayout
is what leaves it as a directory - vs zipapp which is a file. I couldn't recall when that unpacking/packing took placewide-midnight-78598
08/07/2024, 8:40 PMRUN PEX_TOOLS=1 python ./app.deps.pex/ venv --scope=deps --compile /bin/app
- does /bin/app exist?elegant-florist-94385
08/07/2024, 8:43 PMwide-midnight-78598
08/07/2024, 8:44 PM./app
it workedelegant-florist-94385
08/07/2024, 8:45 PMelegant-florist-94385
08/07/2024, 8:45 PMwide-midnight-78598
08/07/2024, 8:46 PMelegant-florist-94385
08/07/2024, 8:49 PMelegant-florist-94385
08/07/2024, 8:49 PMelegant-florist-94385
08/07/2024, 8:49 PMwide-midnight-78598
08/07/2024, 8:52 PMCOPY --chown
?elegant-florist-94385
08/07/2024, 8:53 PMwide-midnight-78598
08/07/2024, 8:53 PM