paylogic / pip-accel

pip-accel: Accelerator for pip, the Python package manager
https://pypi.python.org/pypi/pip-accel
MIT License
308 stars 35 forks source link

[need advice] Do not cache development versions #75

Open HPotter opened 7 years ago

HPotter commented 7 years ago

Hi!

In our team we use pip-accel to accelerate virtualenv creation on Teamcity buildfarm. We install a lot of packages, including some packages from internal repository.

E.g.: build script executes pip-accel -i http://my-index-url -r requirements.txt, where requirements.txt is taken from git repository and contains my-package==1.0.0. But if I want to develop new version (1.0.1) of my-package, I change a line requirements.txt to be like git+https://my-package-repo.git@my-development-branch.

At this moment pip-accel caches my development code on build agent as 1.0.1 or 1.0.0 version (whenever I've changed version in setup.py in my branch or not). Next build on this agent may have correct my-package==1.0.0, but it will load incorrect package version from pip-accel cache.

The only idea is to set version in setup.py to be like 0.0.0.development to be sure that pip-accel will not broke any other caches. But it's uncomfortable to do it by hands every time; also you need to do it with first commit to development branch and remember to replace it with correct version after all development but before merging in to master branch.