From ad145cc078738aaec334d198d05d348e3c60c034 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Feb 2018 09:01:33 +1000 Subject: [PATCH] base: require Python 3.6 Instead of failing with a syntax error on format strings, actually bail out instead. Likewise for setup.py, require 3.6 and add this to the classifiers too while we're there. Related to #71 --- setup.py | 2 ++ tuhi/base.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 14c0480..ff4d7e7 100755 --- a/setup.py +++ b/setup.py @@ -18,5 +18,7 @@ setup(name='tuhi', 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6' ], + python_requires='>=3.6' ) diff --git a/tuhi/base.py b/tuhi/base.py index b3c201f..6da96d7 100644 --- a/tuhi/base.py +++ b/tuhi/base.py @@ -321,6 +321,9 @@ class Tuhi(GObject.Object): def main(args=sys.argv): + if sys.version_info < (3, 6): + sys.exit('Python 3.6 or later required') + desc = 'Daemon to extract the pen stroke data from Wacom SmartPad devices' parser = argparse.ArgumentParser(description=desc) parser.add_argument('-v', '--verbose',