mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-01 00:55:48 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aadc899982 | ||
|
|
4d38bff053 | ||
|
|
a8cd6a92b3 | ||
|
|
a08ad9d2b4 |
6
Makefile
6
Makefile
@@ -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 \
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -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)
|
||||||
|
|||||||
@@ -27,28 +27,33 @@ 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
|
||||||
: Use chosen Python version
|
if [ -n "$PYTHON" ] && "$PYTHON" -c 'import mercurial' 2> /dev/null ; then
|
||||||
elif python3 -c 'import mercurial' 2> /dev/null ; then
|
: Use chosen Python version
|
||||||
PYTHON=python3
|
elif python3 -c 'import mercurial' 2> /dev/null ; then
|
||||||
elif python2 -c 'import mercurial' 2> /dev/null ; then
|
PYTHON=python3
|
||||||
PYTHON=python2
|
elif python2 -c 'import mercurial' 2> /dev/null ; then
|
||||||
elif python -c 'import mercurial' 2> /dev/null ; then
|
PYTHON=python2
|
||||||
PYTHON=python
|
elif python -c 'import mercurial' 2> /dev/null ; then
|
||||||
fi
|
PYTHON=python
|
||||||
if [ -n "$PYTHON" ] ; then
|
fi
|
||||||
test_set_prereq PYTHON
|
if [ -n "$PYTHON" ] ; then
|
||||||
|
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
|
||||||
TEST_BIN="$SHARNESS_TRASH_DIRECTORY/bin"
|
TEST_BIN="$SHARNESS_TRASH_DIRECTORY/bin"
|
||||||
mkdir -p "$TEST_BIN"
|
mkdir -p "$TEST_BIN"
|
||||||
for s in git-remote-hg git-hg-helper ; do
|
for s in git-remote-hg git-hg-helper ; do
|
||||||
printf "%s\n" "#!/usr/bin/env $PYTHON" > "$TEST_BIN/$s"
|
printf "%s\n" "#!/usr/bin/env $PYTHON" > "$TEST_BIN/$s"
|
||||||
tail -n +2 "$SHARNESS_TEST_DIRECTORY/../$s" >> "$TEST_BIN/$s"
|
tail -n +2 "$SHARNESS_TEST_DIRECTORY/../$s" >> "$TEST_BIN/$s"
|
||||||
chmod u+x "$TEST_BIN/$s"
|
chmod u+x "$TEST_BIN/$s"
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user