use python3.4 .5 can not import ed25519 build for 3.4

This commit is contained in:
j 2015-11-04 19:53:43 +01:00
parent 838a7c18b5
commit 395c6e5112
2 changed files with 13 additions and 10 deletions

16
ctl
View File

@ -66,10 +66,10 @@ if [ "$1" == "start" ]; then
fi fi
fi fi
if [ ! -d "$BASE/$NAME/.git" ]; then if [ ! -d "$BASE/$NAME/.git" ]; then
python3 oml install_update python3.4 oml install_update
cd "$BASE/$NAME" cd "$BASE/$NAME"
fi fi
exec python3 oml server $PID exec python3.4 oml server $PID
fi fi
if [ "$1" == "debug" ]; then if [ "$1" == "debug" ]; then
cd "$BASE/$NAME" cd "$BASE/$NAME"
@ -78,7 +78,7 @@ if [ "$1" == "debug" ]; then
exit 1 exit 1
fi fi
shift shift
exec python3 oml server $@ exec python3.4 oml server $@
fi fi
if [ "$1" == "stop" ]; then if [ "$1" == "stop" ]; then
remove_loginscript remove_loginscript
@ -101,13 +101,13 @@ if [ "$1" == "open" ]; then
open "/Applications/Open Media Library.app" open "/Applications/Open Media Library.app"
fi fi
if [ $SYSTEM == "Linux" ]; then if [ $SYSTEM == "Linux" ]; then
exec python3 "$NAME/oml/gtkwebkit.py" $@ exec python3.4 "$NAME/oml/gtkwebkit.py" $@
fi fi
exit 0 exit 0
fi fi
if [ "$1" == "ui" ]; then if [ "$1" == "ui" ]; then
shift shift
exec python3 "$NAME/oml/ui.py" $@ exec python3.4 "$NAME/oml/ui.py" $@
fi fi
if [ "$1" == "update" ]; then if [ "$1" == "update" ]; then
cd "$BASE/$NAME" cd "$BASE/$NAME"
@ -124,15 +124,15 @@ if [ "$1" == "update" ]; then
NEW=`"$0" version` NEW=`"$0" version`
"$0" postupdate -o $OLD -n $NEW "$0" postupdate -o $OLD -n $NEW
else else
python3 oml update python3.4 oml update
fi fi
exit $? exit $?
fi fi
if [ "$1" == "python" ]; then if [ "$1" == "python" ]; then
cd "$BASE/$NAME" cd "$BASE/$NAME"
shift shift
exec python3 $@ exec python3.4 $@
fi fi
cd "$BASE/$NAME" cd "$BASE/$NAME"
exec python3 oml $@ exec python3.4 oml $@

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3.3
from __future__ import division, with_statement, print_function from __future__ import division, with_statement, print_function
from contextlib import closing from contextlib import closing
@ -53,7 +53,7 @@ class Install(Thread):
apt_packages = '' apt_packages = ''
dnf_packages = '' dnf_packages = ''
try: try:
import Image from PIL import Image
import lxml import lxml
except: except:
apt_packages += ' python3.4 python3-pil python3-lxml' apt_packages += ' python3.4 python3-pil python3-lxml'
@ -126,6 +126,9 @@ def has_bin(cmd):
return subprocess.call(['which', cmd], stdout=subprocess.PIPE) == 0 return subprocess.call(['which', cmd], stdout=subprocess.PIPE) == 0
if __name__ == '__main__': if __name__ == '__main__':
if sys.version_info[:2] != (3,4):
print("You need python3.4")
sys.exit(1)
if len(sys.argv) == 1: if len(sys.argv) == 1:
if sys.platform == 'darwin': if sys.platform == 'darwin':
target = os.path.expanduser('~/Library/Application Support/Open Media Libary') target = os.path.expanduser('~/Library/Application Support/Open Media Libary')