Closed jaqx0r closed 4 years ago
The v1.0.0 release removed caching of ~/.local/bin
causing this issue to reappear. https://github.com/CircleCI-Public/python-orb/commit/3c5e34de69a3276d9a4af738133d17398994ec1b#diff-1ee55a5db0a8722d24725e43c731daa7L19 was removed when save-cache.yaml
was rewritten to install-packages.yaml
where it should appear at https://github.com/CircleCI-Public/python-orb/blob/master/src/commands/install-packages.yml#L184-L188
@albertyw just saw your comment. This was similar to another request received via another forum. I opened and explained that with the new convenience images, this should not be an issue with the latest orb: https://github.com/CircleCI-Public/python-orb/issues/52
Please let us know on that issue if there's something wrong with that implementation or something that can be improved.
The cache doesn't include the binaries installed by pip, which makes it very confusing when you have a set of commands like:
and the commands don't exist.
(See https://github.com/CircleCI-Public/python-orb/pull/26)
One fix is to merely add ~/.local/bin to the paths as the above pull does.
A better fix is to get the full installed file list from pip, cp or tar them up into the cache path; on load-cache untar or cp across to the ~/.local path.
Here's an almost complete way to find them:
pip list --user --format json | jq -r '.[].name' | xargs pip show -f
The resulting output has a list of files not easily parseable, and a Location field that needs to be prepended. Binaries also have relative parents pointing back to the bin dir.