hundreds-father-404
03/25/2022, 5:21 AMmain
branch, where you install from a file on the filesystem? John just landed support for VCS/git requirements with Pex lockfiles ๐ We're trying to figure out how to prioritize local requirementsenough-analyst-54434
03/25/2022, 2:09 PMsparse-lifeguard-95737
03/25/2022, 6:49 PMmaster
branch that we install via pip
(weโre still midway through our migration onto pants and havenโt gotten to the point of needing a work-around for it yet)best-florist-45041
03/28/2022, 4:24 PMimport ...
dbt
(https://www.getdbt.com/) is a key dependency. We have our own dbt
plugin as first-party python code. dbt
uses namespace packages to define plugins, e.g. dbt.adaptors.{your_plugin_name}
.
So far, fine. But `dbt`'s python api is experimental, so projects that interact with it prefer to use its CLI using subprocess.Popen
. Without our first-party plugin being installed into site-packages along with the dbt
package, the subprocess.Popen
command does not have the current working directory in the python path, hence the dbt
command is unable to see our plugin.
So ideally, pants could include this plugin as a local file requirement. This is what you are starting to work on, correct?
Existing workarounds:
a) push our plugin to a pypi server separately and include as a 3rd party dep. This misses the point of having a monorepo.
b) without pants, shamefully append the source root to os.environ["PYTHONPATH"]
before calling to the CLI.
Would love to hear any other ideas.hundreds-father-404
03/28/2022, 5:54 PM