# HG changeset patch
# User Matt Harbison <
matt_h...@yahoo.com>
# Date 1781299890 14400
# Fri Jun 12 17:31:30 2026 -0400
# Branch stable
# Node ID 8859294b955ec3ccc498e78e4c6a217e56307616
# Parent 133e58bf58fd2aef8d8bfe41da8132dd314e8f79
# EXP-Topic ci-uv
ci: install `uv` to build Mercurial
This is a short term hack until the CI image can be updated. The version of
`uv` that gets installed seems to default to Python 3.12 when building
Mercurial, so explicitly request `python3.11` to maintain the previous
configuration, and so the cext modules will load when running with `python3`.
The pytype setup script was deleted upstream, so it can't be called.
There's still a failure with the version number being invalid (something doesn't
like the old style `+{node|sort}` any longer), so to use CI at this point,
`setup.py` needs to be hacked to write out `__version__.py` with a fixed X.Y.Z
format for now. That's not done here.
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@
image:
registry.heptapod.net/mercurial/ci-images/thg-pyqt5:$THG_CI_IMAGE_TAG
variables:
- PYTHON: python3
+ PYTHON: python3.11
THG_CI_IMAGE_TAG: v2.1
tests-hg-6.3:
script:
@@ -83,6 +83,8 @@
- hg -R /ci/repos/mercurial pull
https://repo.mercurial-scm.org/hg
- hg -R /ci/repos/mercurial update stable
- hg -R /ci/repos/mercurial summary
+ - pipx install uv==0.11.21
+ - export PATH="$PATH:/home/ci-runner/.local/bin"
- make -C /ci/repos/mercurial local PYTHON=$PYTHON
- /ci/repos/mercurial/hg version --debug
- make local PYTHON=$PYTHON HGPATH=/ci/repos/mercurial
@@ -95,6 +97,8 @@
- hg -R /ci/repos/mercurial pull
https://repo.mercurial-scm.org/hg
- hg -R /ci/repos/mercurial update default
- hg -R /ci/repos/mercurial summary
+ - pipx install uv==0.11.21
+ - export PATH="$PATH:/home/ci-runner/.local/bin"
- make -C /ci/repos/mercurial local PYTHON=$PYTHON
- /ci/repos/mercurial/hg version --debug
- make local PYTHON=$PYTHON HGPATH=/ci/repos/mercurial
@@ -108,10 +112,11 @@
- hg -R /ci/repos/mercurial pull
https://repo.mercurial-scm.org/hg
- hg -R /ci/repos/mercurial update stable
- hg -R /ci/repos/mercurial summary
+ - pipx install uv==0.11.21
+ - export PATH="$PATH:/home/ci-runner/.local/bin"
- make -C /ci/repos/mercurial local PYTHON=$PYTHON
- /ci/repos/mercurial/hg version --debug
- make local PYTHON=$PYTHON HGPATH=/ci/repos/mercurial
- - PYTHON=$PYTHON /ci/repos/mercurial/contrib/setup-pytype.sh
- ln -svf $(pwd)/contrib/typehints/* $($PYTHON -c "import pytype; print(pytype.__path__[0])")/typeshed/stubs/
- make pytype PYTHON=$PYTHON HGPATH=/ci/repos/mercurial PYTHON_VERSION=3.11
allow_failure: true
@@ -123,10 +128,11 @@
- hg -R /ci/repos/mercurial pull
https://repo.mercurial-scm.org/hg
- hg -R /ci/repos/mercurial update default
- hg -R /ci/repos/mercurial summary
+ - pipx install uv==0.11.21
+ - export PATH="$PATH:/home/ci-runner/.local/bin"
- make -C /ci/repos/mercurial local PYTHON=$PYTHON
- /ci/repos/mercurial/hg version --debug
- make local PYTHON=$PYTHON HGPATH=/ci/repos/mercurial
- - PYTHON=$PYTHON /ci/repos/mercurial/contrib/setup-pytype.sh
- ln -svf $(pwd)/contrib/typehints/* $($PYTHON -c "import pytype; print(pytype.__path__[0])")/typeshed/stubs/
- make pytype PYTHON=$PYTHON HGPATH=/ci/repos/mercurial PYTHON_VERSION=3.11
allow_failure: true