#!/bin/bash # Build script for Mercurial (CPython application). # Builds against the `python` zport; installs /usr/local/bin/hg. set -e cd "$SRCDIR" PYTHON="$PREFIX/bin/python3" # Mercurial's setup.py imports setuptools_scm (only needed for VCS/dev builds); # a release tarball has __version__ baked in. Patch out the import. sed -i 's/import setuptools_scm/setuptools_scm = None # release tarball/' setup.py # setup.py needs setuptools — Python 3.13's ensurepip ships pip only. pip works # against the base OpenSSL 3.5, so fetch setuptools from PyPI over HTTPS. "$PYTHON" -m pip install --quiet setuptools # Build + install the C extensions and pure-Python modules; hg gets an # absolute #!$PREFIX/bin/python3 shebang. "$PYTHON" setup.py build "$PYTHON" setup.py install --prefix="$PREFIX" --root="$PKGDIR" # Mercurial - distributed source control (CPython application) # https://www.mercurial-scm.org/ [package] name = "mercurial" version = "7.1.2" release = 1 description = "Mercurial distributed version control system" url = "https://www.mercurial-scm.org/" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["python"] build = ["python"] [[source]] file = "mercurial-7.1.2.tar.gz" urls = ["https://www.mercurial-scm.org/release/mercurial-7.1.2.tar.gz"] checksum = "ce27b9a4767cf2ea496b51468bae512fa6a6eaf0891e49f8961dc694b4dc81ca" extract = true [build] parallel = false