Skip to content

Commit 0cf6e14

Browse files
committed
replace python with python2. closes kivy#60
1 parent adf627e commit 0cf6e14

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

distribute.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@
99
# Modules
1010
MODULES=$MODULES
1111

12+
# Resolve Python path
13+
PYTHON="$(which python2.7)"
14+
if [ "X$PYTHON" == "X" ]; then
15+
PYTHON="$(which python2)"
16+
fi
17+
if [ "X$PYTHON" == "X" ]; then
18+
PYTHON="$(which python)"
19+
fi
20+
1221
# Paths
13-
ROOT_PATH="$(dirname $(python -c 'import os,sys;print os.path.realpath(sys.argv[1])' $0))"
22+
ROOT_PATH="$(dirname $($PYTHON -c 'import os,sys;print os.path.realpath(sys.argv[1])' $0))"
1423
RECIPES_PATH="$ROOT_PATH/recipes"
1524
BUILD_PATH="$ROOT_PATH/build"
1625
LIBS_PATH="$ROOT_PATH/build/libs"
@@ -133,7 +142,7 @@ function push_arm() {
133142
export LDFLAGS="-lm"
134143

135144
# this must be something depending of the API level of Android
136-
PYPLATFORM=$(python -c 'import sys; print sys.platform')
145+
PYPLATFORM=$($PYTHON -c 'import sys; print sys.platform')
137146
if [ "$PYPLATFORM" == "linux2" ]; then
138147
PYPLATFORM="linux"
139148
elif [ "$PYPLATFORM" == "linux3" ]; then

src/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python2
22

33
from os.path import dirname, join, isfile, realpath, relpath, split
44
from zipfile import ZipFile

0 commit comments

Comments
 (0)