# HG changeset patch # User Zeger Van de Vannet # Date 1746734201 -7200 # Node ID 6fb43864241b60d57f8b85d1046e6e2ae65395b2 # Parent a1fab5298ef60ab5a315f869bb8e6a8a5899dbf8 feat: install mercurial using pipx diff -r a1fab5298ef6 -r 6fb43864241b .chezmoiscripts/run_onchange_after_17-install-mercurial.sh.tmpl --- a/.chezmoiscripts/run_onchange_after_17-install-mercurial.sh.tmpl Mon Apr 21 20:13:02 2025 +0200 +++ b/.chezmoiscripts/run_onchange_after_17-install-mercurial.sh.tmpl Thu May 08 21:56:41 2025 +0200 @@ -1,19 +1,15 @@ +{{ $version := "7.0.2" -}} {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}} -{{ $version := "6.9.2" -}} +#!/usr/bin/env -S ${HOME}/bin/mise exec python@3.10 rust@1.81.0 -- bash +{{ else }} #!/usr/bin/env bash +{{ end }} set -xe -sudo apt install --yes clang rustc cargo python3-dev python3-setuptools python3-docutils python3-pip - -curl -fsSL https://foss.heptapod.net/mercurial/mercurial-devel/-/archive/{{ $version }}/mercurial-devel-{{ $version }}.tar.gz | tar xz -C /tmp -cd /tmp/mercurial-devel-{{ $version }} - -mkdir -p $HOME/mercurial +{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}} +sudo apt install --yes clang rustc cargo python3-dev +{{ end }} -$HOME/bin/mise exec python@3.10 -- pip install docutils -$HOME/bin/mise exec python@3.10 rust@1.81.0 -- make PURE=--rust install-home -$HOME/bin/mise exec python@3.10 rust@1.81.0 -- pip install --upgrade hg-evolve~=11.1.3 hg-git~=1.1.2 mercurial_keyring~=1.4.4 - - -{{ end }} +pipx install "mercurial=={{ $version }}" --pip-args '--no-cache-dir --config-settings --global-option=--rust --no-binary=mercurial' +pipx inject mercurial hg-evolve~=11.1.8 hg-git~=1.1.2 mercurial_keyring~=1.4.4