1
0
mirror of https://github.com/CMiksche/gitea-auto-update synced 2025-12-10 07:57:23 +01:00

feat: add restriction for python 3

Add a restriction for python 3 so that installing this software with python 2 isn't possible.

Should fix GH-10.
This commit is contained in:
Christoph Miksche
2019-09-02 13:45:57 +02:00
parent d291779fa7
commit 3828e07d90
2 changed files with 7 additions and 1 deletions

View File

@@ -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()

View File

@@ -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',