wide-midnight-78598
03/31/2022, 1:04 AMansible_pex = await Get(
Pex,
PexRequest,
ansible.to_pex_request(),
)
This takes about 200 seconds on my macbook, while pip installing ansible is about 45 seconds.
I know this is doing more than just installing, but I feel like maybe I'm missing an optimizationfast-nail-55400
03/31/2022, 1:08 AMansible
something that derives from PythonToolRequirementsBase
?wide-midnight-78598
03/31/2022, 1:09 AMPythonToolBase
- I think I basically copied what I did for PyOxidizerfast-nail-55400
03/31/2022, 1:09 AMPythonToolBase
derives from PythonToolRequirementsBase
wide-midnight-78598
03/31/2022, 1:11 AMhappy-kitchen-89482
03/31/2022, 1:31 AMwide-midnight-78598
03/31/2022, 1:37 AMfast-nail-55400
03/31/2022, 1:56 AMproud-dentist-22844
03/31/2022, 4:05 AMansible
? I recommend relying on ansible-core
for almost everything.
ansible
includes around 100 collections which takes awhile to download and install.
It is much better to install ansible-core
and just the collections you need.ansible
can't provide wheels because it depends on symlinks and the zip format does not support that.wide-midnight-78598
03/31/2022, 12:09 PMansible
is core + community, correct? Does core
come with playbooks? The goal here is to streamline end user experience, without re-building too much of what already existsansible
is core + some Collections from community?ansible-core
, while prototyping, I grabbed whatever I use in some of my client projects, and in those I use a bunch of community packages as well, so it makes slightly more sense. However, for a plugin like this, ansible-core
is definitely the way to go. Thanks!proud-dentist-22844
03/31/2022, 3:43 PMRather,where some = about 100 đ (quite a bit more than a bunch) There are so many collections, I prefer to get just the collections I depend on on a case by case basis.is core + some Collections from community?ansible
wide-midnight-78598
03/31/2022, 3:44 PMansible
witty-crayon-22786
03/31/2022, 4:45 PMpip
under the hood, so in general it should take roughly the same time. some factors that can make it different:
1. cold caches: PEX puts the pip cache in a non-default location (so that we can monitor usage, and more easily clear it)
2. building the PEX for more interpreters than you need it for. for a PEX that you wonât be publishing anywhere, you should ensure that youâre building an âinternal_onlyâ PEX: it will only work on a single python interpreter selected by the Pants process, and that avoids building wheels for other interpreters if userâs interpreter constraints are more broadwide-midnight-78598
03/31/2022, 4:47 PMinternal=True
which is a big reason for my confusion. I didn't know about the cold caches though, that's helpful. Either way, with the switch to ansible-core
, we're down to like 10 seconds of build time đproud-dentist-22844
03/31/2022, 4:50 PM