hg-current:default image triggers impossible Mercurial update attempts
In this failed CI job, one can see the installation of py-heptapod
on a Docker container running the hg-current:default
image attempting to install Mercurial 5.7 from PyPI.
The installation fails, and that is a good thing: we don't want tests to run on the wrong Mercurial version.
The reason is a bit puzzling. Extract from a Docker run
of a freshly built hg-current:default
image with the same revision of Mercurial as currently in the registry:
root@aa1a001175f6:/# python3 -m pip freeze | grep mercurial
mercurial===5.7-.162.c82d6363bc9e
What happens is that pip doesn't understand the installed version (not PEP440 compliant), and the Mercurial>=5.2
requirement that py-heptapod
provides then behaves as if it weren't installed:
root@aa1a001175f6:/# python3 -m pip install "Mercurial>=5.2"
Collecting Mercurial>=5.2
(... same error as in CI follows ...)
What is really puzzling is that c82d6363bc9e
is a descendant of a commit that does fix the Mercurial version:
changeset: 49014:866eb4d6bd9f
user: Joerg Sonnenberger <joerg@bec.de>
date: Thu Feb 04 23:11:42 2021 +0100
summary: build: fake PEP440 versions
and, indeed python setup.py
does the right thing on c82d6363bc9e
. From a clone of Mercurial:
$ hg log -r. -T '{node|short}\n'
c82d6363bc9e
$ /tmp/testenv3/bin/python setup.py install
(...)
$ /tmp/testenv3/bin/python -m pip freeze | grep mercurial
mercurial==5.7+hg162.c82d6363bc9e