Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basilisk always upgrades Pip, which sometimes fails if conflicts with user's cache #459

Open
patkenneally opened this issue Oct 18, 2023 · 2 comments
Assignees
Labels
build Build system or compilation enhancement

Comments

@patkenneally
Copy link
Contributor

Describe the bug
Basilisk always upgrades Pip. Recently a new version of pip was released (23.3.0) which conflicts with a user's cache ~/Library/Caches/pip/selfcheck/. The pip upgrade does not purge/remove cache items (using pip cache remove/purge) and so fails.

To reproduce
Steps to reproduce the behavior:

  1. Assume installed pip version of 22.0.1 or less
  2. Run conanfile.py which will automatically upgrade to latest (23.3 as of writing)
  3. Upgrade will fail due to conflict with cached data in ~/Library/Caches/pip/selfcheck/

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots/plots to help explain your problem.

Desktop (please complete the following information):

  • OS: Macos
  • Version 13.6
  • Python version 3.9.15

Additional context
Some additional rumination: the build system should be sufficiently opinionated so to ensure that the build configuration is robust and repeatable across systems e.g. pinning conan recipes, but not so much as to specify options not needed, or at least give the user an option to configure their system. In the case of pip, the project can specify a minimum required, and only then try and update. This doesn't fix the issue of deleting the local cache, but it does at least mean that it doesn't trigger the issue unnecessarily. I think a good solution here would be to check for a minimum version, and if an upgrade is required, run a strategic (if some strategy exists) pip cache purge/remove.

@patkenneally patkenneally self-assigned this Oct 18, 2023
@patkenneally patkenneally added the build Build system or compilation enhancement label Oct 18, 2023
@schaubh
Copy link
Contributor

schaubh commented Oct 18, 2023

As the pip cache is not held in the virtual environement, running pip cache purse/remove in our setup would not make sense?

@patkenneally
Copy link
Contributor Author

True. I use a combination of pyenv and virtual environments. A large majority of the time I use pyenv. It gives me a bit more control over my python versions and builds. And managing the pip cache would work in the case of pyenv. For sure, virtual environments are good for everyday BSK development. I'll poke around further to see about a general solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system or compilation enhancement
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants