sparse-lifeguard-95737
12/06/2022, 9:49 PM./pants export --symlink-python-virtualenv
🧵sparse-lifeguard-95737
12/06/2022, 9:50 PMexport PYTHONPATH=${REPO_ROOT}/src
to use python
directly / to run scripts in the virtualenvsparse-lifeguard-95737
12/06/2022, 9:51 PMPYTHONPATH
is present in os.environ
, but it’s not updating sys.path
- only when running one of our custom binaries. the binary uses importlib
to dynamically import other modules in our source, and this is failing with `ModuleNotFoundError`ssparse-lifeguard-95737
12/06/2022, 9:52 PMpython
in the same venvsparse-lifeguard-95737
12/06/2022, 9:53 PMPYTHONPATH
ends up getting stripped from the env in certain casesenough-analyst-54434
12/06/2022, 9:53 PMsparse-lifeguard-95737
12/06/2022, 9:54 PMenough-analyst-54434
12/06/2022, 9:54 PMenough-analyst-54434
12/06/2022, 9:54 PMsparse-lifeguard-95737
12/06/2022, 9:56 PMsparse-lifeguard-95737
12/06/2022, 9:56 PME
passed to python
enough-analyst-54434
12/06/2022, 9:56 PMenough-analyst-54434
12/06/2022, 9:56 PMenough-analyst-54434
12/06/2022, 9:57 PMPYTHONPATH=x venv/bin/python venv/bin/script
as things stand for that script.enough-analyst-54434
12/06/2022, 9:58 PMsparse-lifeguard-95737
12/06/2022, 10:07 PMpylint
when it tries to load first-party pluginssparse-lifeguard-95737
12/06/2022, 10:08 PM./pants lint
instead of running pylint
directly, but trying to be flexible during the transition period 🤔sparse-lifeguard-95737
12/06/2022, 10:11 PMenough-analyst-54434
12/06/2022, 10:18 PMenough-analyst-54434
12/06/2022, 10:19 PMsparse-lifeguard-95737
12/07/2022, 2:32 PMenough-analyst-54434
12/07/2022, 4:32 PM