Skip to content

Conversation

joshfriend
Copy link
Collaborator

This noticeably speeds up the time it takes to reinstall dependencies.

Makefile Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no period prefixing .clean-env but one prefixing .clean-cache?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the . prefixed targets are supposed to be "plumbing commands", .clean-cache is probably one of those commands that people won't need to run specifically or know anything about. clean-env should be exposed so there is a way of rebuilding the virtualenv without clearing the download cache by using clean-all (which would make caching pointless).

@jacebrowning
Copy link
Owner

@joshfriend Will pip use the cache if there is no internet access?

@joshfriend
Copy link
Collaborator Author

With this configuration, pip will still look at the PyPI index, but doesn't re-download the packages. We could use --no-index and --find-links options to disable the index lookup, but that doesnt sound like a good option.

@jacebrowning
Copy link
Owner

The best would setup would be don't touch the internet and use the local cache unless a dependency isn't met then download and cache from PyPI. I've been in situations where pip failed simply because it couldn't phone home to PyPI.

Makefile Outdated
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be rm -rf $(PIP_CACHE_DIR).

jacebrowning added a commit that referenced this pull request Oct 30, 2014
Let pip use a local download cache
@jacebrowning jacebrowning merged commit 6e345dc into master Oct 30, 2014
@jacebrowning jacebrowning deleted the pip-cache branch October 30, 2014 20:12
juneqch added a commit to profilech/.cookiecutter-template-python that referenced this pull request Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants