3

I'm automatically building wheels for each tagged release using github URL. These wheels are then uploaded to a wheelhouse.

Command I'm using is

pip wheel --wheel-dir=/tmp/wheels/                             \
          --find-links=http://wheelhouse/index.html            \
          git+ssh://git@github.com/company/project.git@1.2.3

/tmp/wheels/ is initially empty.

This rebuilds, even if the wheel for the release 1.2.3 of the project is already in the remote wheelhouse. Short of downloading all the wheels from the wheelhouse into local wheel dir, is there any other way of preventing unnecessary rebuilding?

vartec
  • 131,205
  • 36
  • 218
  • 244
  • Since you explicitly specify the version number, why not just check if the version already exists in the wheelhouse before calling `pip wheel` on it? – Akshat Mahajan Feb 16 '17 at 01:07
  • @AkshatMahajan I would need to know the name of the wheel, which might not match the github name (for example `http://github.com/datastax/python-driver@3.7.1` builds wheel `cassandra-driver-3.71`). Assuming I'd get that from the `setup.py`, I'd still need to do that with a script. More moving parts, more prone to breaking. – vartec Feb 16 '17 at 01:14
  • I believe this is [an open issue on the `pip` issuetracker](https://github.com/pypa/pip/issues/855). Until that gets resolved, I don't believe you have much of a choice. Just maintain a local mapping of URL to wheel name in `script.py` or somewhere else, and check against that. – Akshat Mahajan Feb 16 '17 at 01:20
  • @AkshatMahajan you're right. I hoped from some kind of workaround, but it might as well not be possible w/o doing this check myself – vartec Feb 16 '17 at 02:52

0 Answers0