4 Commits

Author SHA1 Message Date
Mark Nauwelaerts
aadc899982 Release v1.0.3.1 2022-02-22 22:00:48 +01:00
Paul Wise
4d38bff053 Fail the build when Python with Mercurial is not available 2022-02-22 21:58:51 +01:00
Paul Wise
a8cd6a92b3 Do not overwrite found python executable with 'python' 2022-02-22 21:58:51 +01:00
Paul Wise
a08ad9d2b4 Add an option to test the pre-installed scripts
This is useful for distros like Debian that do tests on installed packages.

See-also: https://ci.debian.net/
2022-02-22 21:58:51 +01:00
3 changed files with 30 additions and 25 deletions

View File

@@ -14,9 +14,9 @@ build:
PYTHON=python2 ; \ PYTHON=python2 ; \
elif python -c 'import mercurial' 2> /dev/null ; then \ elif python -c 'import mercurial' 2> /dev/null ; then \
PYTHON=python ; \ PYTHON=python ; \
fi ; \ else ; \
if [ -n "$$PYTHON" ] ; then \ echo 'Python with Mercurial not available' >&2 ; \
PYTHON=python ; \ exit 1 ; \
fi ; \ fi ; \
mkdir -p bin ; \ mkdir -p bin ; \
for s in git-remote-hg git-hg-helper ; do \ for s in git-remote-hg git-hg-helper ; do \

View File

@@ -3,7 +3,7 @@
import setuptools import setuptools
# strip leading v # strip leading v
version = 'v1.0.3'[1:] version = 'v1.0.3.1'[1:]
# check for released version # check for released version
assert (len(version) > 0) assert (len(version) > 0)

View File

@@ -27,16 +27,17 @@ SHARNESS_BUILD_DIRECTORY="$(mktemp -d)"
export PATH="${PATH#*:}" export PATH="${PATH#*:}"
rmdir "$SHARNESS_BUILD_DIRECTORY" rmdir "$SHARNESS_BUILD_DIRECTORY"
if [ -n "$PYTHON" ] && "$PYTHON" -c 'import mercurial' 2> /dev/null ; then if [ -z "$TEST_INSTALLED_SCRIPTS" ] ; then
if [ -n "$PYTHON" ] && "$PYTHON" -c 'import mercurial' 2> /dev/null ; then
: Use chosen Python version : Use chosen Python version
elif python3 -c 'import mercurial' 2> /dev/null ; then elif python3 -c 'import mercurial' 2> /dev/null ; then
PYTHON=python3 PYTHON=python3
elif python2 -c 'import mercurial' 2> /dev/null ; then elif python2 -c 'import mercurial' 2> /dev/null ; then
PYTHON=python2 PYTHON=python2
elif python -c 'import mercurial' 2> /dev/null ; then elif python -c 'import mercurial' 2> /dev/null ; then
PYTHON=python PYTHON=python
fi fi
if [ -n "$PYTHON" ] ; then if [ -n "$PYTHON" ] ; then
test_set_prereq PYTHON test_set_prereq PYTHON
# Change shebang on a copy of scripts to chosen Python version # Change shebang on a copy of scripts to chosen Python version
@@ -49,6 +50,10 @@ if [ -n "$PYTHON" ] ; then
done done
export PATH="$TEST_BIN${PATH:+:$PATH}" export PATH="$TEST_BIN${PATH:+:$PATH}"
unset TEST_BIN unset TEST_BIN
fi
else
# The build/install process ensures Python is available
test_set_prereq PYTHON
fi fi
GIT_AUTHOR_EMAIL=author@example.com GIT_AUTHOR_EMAIL=author@example.com