Permalink
Browse files

py3: change Python version checks from 2.x to 3.2+

  • Loading branch information...
1 parent 0e780ce commit 0e87b422628a3cefb97fa128a33f374a08ca3c5d @multani committed Nov 28, 2012
Showing with 12 additions and 9 deletions.
  1. +1 −1 run-tests
  2. +5 −0 setup.py
  3. +6 −8 sonata/launcher.py
View
@@ -1,4 +1,4 @@
#!/bin/sh
BASEDIR=$(dirname $0)
cd $BASEDIR
-python setup.py test
+python3 setup.py test
View
@@ -1,5 +1,10 @@
#!/usr/bin/env python
+import sys
+if sys.version_info <= (3, 2):
+ sys.stderr.write("Sonata requires Python 3.2+\n")
+ sys.exit(1)
+
from distutils.dep_util import newer
import glob
import os
View
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Sonata is a simple GTK+ client for the Music Player Daemon.
"""
@@ -24,12 +24,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
+import sys
+if sys.version_info <= (3, 2):
+ sys.stderr.write("Sonata requires Python 3.2+\n")
+ sys.exit(1)
+
import gettext
import locale
import logging
import os
import platform
-import sys
import threading # needed for interactive shell
@@ -107,12 +111,6 @@ def run():
## Check initial dependencies:
-
- # Test python version:
- if sys.version_info < (2,5):
- logger.critical("Sonata requires Python 2.5 or newer. Aborting...")
- sys.exit(1)
-
try:
import mpd
except:

0 comments on commit 0e87b42

Please sign in to comment.