From 74e5bcf500b943d62c8ba6b4656e779cfe8e9c8d Mon Sep 17 00:00:00 2001 From: "Jeffrey S. Smith" Date: Fri, 6 Sep 2013 20:40:48 -0500 Subject: [PATCH 1/3] Update helper scripts to Python 3 --- scripts/check_dependencies.py | 6 +++--- scripts/translation_utils.py | 8 ++++---- setup.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index 348a809eb..c37bc5821 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 @@ -49,7 +49,7 @@ except ImportError: IS_WIN = sys.platform.startswith('win') VERS = { - 'Python': '2.6', + 'Python': '3.0', 'PyQt4': '4.6', 'Qt4': '4.6', 'sqlalchemy': '0.5', @@ -76,6 +76,7 @@ MODULES = [ 'PyQt4.QtWebKit', 'PyQt4.phonon', 'sqlalchemy', + 'alembic', 'sqlite3', 'lxml', 'chardet', @@ -85,7 +86,6 @@ MODULES = [ 'cherrypy', 'uno', 'icu', - 'bs4', ] diff --git a/scripts/translation_utils.py b/scripts/translation_utils.py index a9fa86db9..32f54a950 100755 --- a/scripts/translation_utils.py +++ b/scripts/translation_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 @@ -102,7 +102,7 @@ class CommandStack(object): def __iter__(self): return self - def next(self): + def __next__(self): if self.current_index == len(self.data): raise StopIteration else: @@ -145,9 +145,9 @@ def print_quiet(text, linefeed=True): global quiet_mode if not quiet_mode: if linefeed: - print text + print (text) else: - print text, + print (text, end=' ') def print_verbose(text): """ diff --git a/setup.py b/setup.py index 0e8f02384..4e97683a9 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 From c45d225b9dc453d829b5971a8eae22fb9be020b2 Mon Sep 17 00:00:00 2001 From: "Jeffrey S. Smith" Date: Sat, 7 Sep 2013 16:29:31 -0500 Subject: [PATCH 2/3] PyIcu is really a Windows-only dependency --- scripts/check_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index c37bc5821..07c84b76f 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -63,6 +63,7 @@ WIN32_MODULES = [ 'win32ui', 'pywintypes', 'pyodbc', + 'icu', ] MODULES = [ @@ -85,7 +86,6 @@ MODULES = [ 'mako', 'cherrypy', 'uno', - 'icu', ] From afb8f088a6484b51c5e120f927ea28ff50b4ad70 Mon Sep 17 00:00:00 2001 From: "Jeffrey S. Smith" Date: Sun, 8 Sep 2013 08:17:14 -0500 Subject: [PATCH 3/3] Remove extra whitespace --- scripts/translation_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/translation_utils.py b/scripts/translation_utils.py index 32f54a950..0069d411a 100755 --- a/scripts/translation_utils.py +++ b/scripts/translation_utils.py @@ -145,9 +145,9 @@ def print_quiet(text, linefeed=True): global quiet_mode if not quiet_mode: if linefeed: - print (text) + print(text) else: - print (text, end=' ') + print(text, end=' ') def print_verbose(text): """