quaint-telephone-89068
12/01/2022, 4:02 PM./pants package src/package-a/package_a:pex_package_a runs into this issue:
$ PEX_TOOLS=1 python3.9 dist/src.package-a.package_a/pex_package_a.pex venv --scope=deps --compile ./pex-deps-compiled 2>&1 | grep -C5 SyntaxError
Compiling './pex-deps-compiled/lib/python3.9/site-packages/aenum/__init__.py'...
Compiling './pex-deps-compiled/lib/python3.9/site-packages/aenum/_py2.py'...
*** File "./pex-deps-compiled/lib/python3.9/site-packages/aenum/_py2.py", line 5
raise exc, None, tb
^
SyntaxError: invalid syntax
Compiling './pex-deps-compiled/lib/python3.9/site-packages/aenum/_py3.py'...
Listing './pex-deps-compiled/lib/python3.9/site-packages/aenum/doc'...
Compiling './pex-deps-compiled/lib/python3.9/site-packages/aenum/test.py'...
Compiling './pex-deps-compiled/lib/python3.9/site-packages/aenum/test_v3.py'...
The aenum/_py2.py file will never get imported by the Python 3.9 interpreter; so this compile failure is not relevant.
If the compile error is real, the application will encounter it at runtime and fail anyhow. On balance, it seems a later warning is by far the lesser of two evils here. Currently failing the venv creation due to failing compilation of a file stops things in their tracks with no recourse.
pantsbuild/pexuser
12/14/2022, 2:54 PM