diff options
author | Damien | 2020-12-30 02:03:56 +0100 |
---|---|---|
committer | Damien | 2020-12-30 02:03:56 +0100 |
commit | 4a53e5b0f5c092e845994a38dab269a63a93dc1f (patch) | |
tree | eabab77c680d71fa89d5ac7acf50c7d564a2a871 /PKGBUILD | |
parent | 0c5cb4e6e6728167f670e3be20bf27a0f2529d0a (diff) | |
download | aur-4a53e5b0f5c092e845994a38dab269a63a93dc1f.tar.gz |
Some improvements
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -12,8 +12,11 @@ url='https://www.mercurial-scm.org/doc/evolution/' source=("https://files.pythonhosted.org/packages/source/h/hg-evolve/hg-evolve-${pkgver}.tar.gz") sha512sums=('26333db8f71a6116ce9d8cbb21940befa573c1bbba3361af4776b4b2d3a3eca33b2c01ab5b5c9dc95810fb89f1e84b2ad85bf0a48989f5c583ebfca922d7d4da') -_pyexe=$(LC_ALL=C hg debuginstall | perl -nE "/Python executable \((.*?)\)/ and print \$1") -command -v $_pyexe >/dev/null || _pyexe=python +_pyexe() { + local _pyexe=$(hg debuginstall -T '{pythonexe}') + command -v $_pyexe >/dev/null || _pyexe=python + printf '%s' "$_pyexe" +} build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -23,13 +26,13 @@ check() { # Tests depend of Mercurial sources if [[ -n "${HGSRC}" ]]; then cd "${srcdir}/${pkgname}-${pkgver}/tests" - "$_pyexe" "${HGSRC}/tests/run-tests.py" + "$(_pyexe)" "${HGSRC}/tests/run-tests.py" fi } package() { cd "${srcdir}/${pkgname}-${pkgver}" - "$_pyexe" setup.py install --optimize=1 --prefix=/usr --root="${pkgdir}" + "$(_pyexe)" setup.py install --optimize=1 --prefix=/usr --root="${pkgdir}" rm -f "${pkgdir}/usr/lib/python"*"/site-packages/hgext3rd/"{__pycache__/,}"__init__"*".py"{,o,c} } |