For python dependencies, can pants be configured t...
# general
f
For python dependencies, can pants be configured to work with extracted source distributions? The python-repos docs only mention sdists / wheels.
Example:
Copy code
ACAM-M-RWLH:mymonorepo acam$ ls -l third-party/wrapt-1.17.0/
total 72
-rw-r--r--   1 acam  staff  1304 10 Dec 20:42 LICENSE
-rw-r--r--   1 acam  staff   108 10 Dec 20:42 <http://MANIFEST.in|MANIFEST.in>
-rw-r--r--   1 acam  staff  6353 10 Dec 20:42 PKG-INFO
-rw-r--r--   1 acam  staff  5168 10 Dec 20:42 README.rst
-rw-r--r--   1 acam  staff  2914 10 Dec 20:42 setup.cfg
-rw-r--r--   1 acam  staff  1087 10 Dec 20:42 setup.py
drwxr-xr-x   4 acam  staff   128 10 Dec 20:42 src
drwxr-xr-x  37 acam  staff  1184 28 Jan 15:35 tests
ACAM-M-RWLH:mymonorepo acam$
So basically, if I specify
wrapt==1.17.0
somewhere, I want pants to find it here (in extracted form)...
We vendor all of our third-party dependencies, basically, by pulling the pristine upstream sources into our monorepo instead of wheels.
I think I've just convinced myself that if we were to adopt pants, we should first re-do how we manage our third-party dependencies. It's been another wish list item for a long time to stop vendoring all of the source and instead move to an internal artifactory or pypi style repo...
c
You could -- I think -- treat each vendor directory as a Pants source root and add BUILD files with python_sources. The details here would depend somewhat on if you are vendoring the upstream source repo or published wheels
f
We are vendoring the source. A few reasons for that, one is that it's not uncommon for us to make custom mods. Although we could handle that in other ways.
Thanks for the idea! I was thinking similar, but since Pants doesn't actually support third-party source vendoring, I'm still thinking it'd be better in the long run to retool our system to be more in line with the approaches it does support...