Hey all,

Patching 3rd party repositories comes up every so often at $WORK and one of the things we do is build a local version that is generally some released version + a couple of local patches.

We follow the usual version scheme of using the public version identifier + local version label.

The steps are as follows:

python setup.py egg_info -b "+local<build number>" sdist bdist_wheel
twine upload dist/*.whl

We only really care about the wheel though, and for all of our other dependencies we basically just run:

pip wheel <some pip valid URL>

and upload it to our local pypi instance.

This also allows us to directly build from Github repositories.

With for example:

pip wheel git+https://github.com/org/somerepo.git@ourpatchset#egg=somerepo

However we would like to add the build number so that when a new release is provided upstream we can easily update our local repository (or preferably we have upstreamed our patch in the meantime) and build a new release with our patches.

Is there some way to influence the egg info for the build when using pip wheel? Some thing like:

pip wheel git+https://github.com/org/somerepo.git@ourpatchset#egg=somerepo&egg_info="-b +local<build number>"

Or is there a better method for dealing with this scenario?

Bert JW Regeer