diff --git a/gitea_auto_update/update.py b/gitea_auto_update/update.py index f330371..dabda1c 100644 --- a/gitea_auto_update/update.py +++ b/gitea_auto_update/update.py @@ -7,6 +7,7 @@ All rights reserved. License: GNU General Public License ''' import os +import sys import logging import configparser import fire @@ -74,8 +75,12 @@ def updater(settings='settings.ini'): config.get('Gitea', 'tmpDir'), config.get('Gitea', 'system')) + def main(): + if not sys.version_info[0] == 3: + sys.exit("Sorry, Python 2 is not supported. Please update to Python 3.") fire.Fire(updater) + if __name__ == '__main__': main() \ No newline at end of file diff --git a/setup.py b/setup.py index 744af2b..e292045 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup(name='gitea_auto_update', - version='2.0.5', + version='2.0.6', description='A script which can update gitea to a new version.', long_description=long_description, long_description_content_type="text/markdown", @@ -18,6 +18,7 @@ setuptools.setup(name='gitea_auto_update', "Operating System :: Unix", ], keywords=['gitea', 'update', 'debian', 'linux'], + python_requires='>=3', install_requires=[ 'requests', 'packaging',