Closed geertn closed 8 years ago
It seems pip-accel will install whatever is in its cache, regardless of whether there's a new version in its index, unless you specify the version you want to install. Interestingly, it also does this if you try to do something like pip-accel install --upgrade ./package-1.2.3.tar.gz
, which had me quite confused.
This kinda makes sense, if I understand how it works. I'd assume it treats every requirement the same, and if the package I'm installing specifies a requirement without a version specifier, I want it to just use whatever's in the cache. It'd be nice if this behavior could be overridden to have it ignore the cache just for the package in the actual command when the --upgrade
flag is given, regardless of whether a version specifier is given. I don't know how feasible that is.
Failing that, the way I've scripted around this is to run rm $(python -c 'from pip_accel.config import Config; print Config().data_directory')/sources/$PACKAGE_NAME*
before the install command to manually clear it from the cache.
Thx for your comment. Way we solved it is first do a run with pip-accel and after that do a run with standard pip.
Hi @geertn and @embolalia,
Thanks for the feedback and sorry for not replying here earlier.
The behavior described in this issue is indeed how pip-accel was originally designed to work, so not exactly a bug. When the (name, version) requirements specified on the command line can be satisfied based on cached source and binary distributions on the local file system pip-accel would install those and not go looking for updates on remote package indexes.
However just because pip-accel was designed like this doesn't mean that this behavior of ignoring the -U
, --upgrade
option hasn't annoyed the hell out of me :-). This is why I've just released pip-accel 0.34 which changes behavior in this respect:
-U
or --upgrade
is given then new versions in remote indexes will be discovered and preferred, regardless of whether older locally cached versions can be used to satisfy the requirements.-U
and --upgrade
aren't given and the requirements can be satisfied from the local file system then new versions in remote indexes will not be discovered.I believe that with this change things should work as intuitively as possible. Sorry about the confusion caused by the behavior of previous versions!
Maybe I'm making an obvious mistake, or my use case might not be suitable for pip-accel. Sorry in advance :)
I'm using pip to install/update packages in a ve. When using pip-accel my package is not updated to the latest version present on my pypi server, probably because of the --no-index option used for pip? Is there any way I can configure pip-accel to scan my pypi server to check for an updated package?
I was expecting this behaviour only when using pinned versions.