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:
@@ -7,6 +7,7 @@ All rights reserved.
|
|||||||
License: GNU General Public License
|
License: GNU General Public License
|
||||||
'''
|
'''
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import configparser
|
import configparser
|
||||||
import fire
|
import fire
|
||||||
@@ -74,8 +75,12 @@ def updater(settings='settings.ini'):
|
|||||||
config.get('Gitea', 'tmpDir'),
|
config.get('Gitea', 'tmpDir'),
|
||||||
config.get('Gitea', 'system'))
|
config.get('Gitea', 'system'))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
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)
|
fire.Fire(updater)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
3
setup.py
3
setup.py
@@ -4,7 +4,7 @@ with open("README.md", "r") as fh:
|
|||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
|
|
||||||
setuptools.setup(name='gitea_auto_update',
|
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.',
|
description='A script which can update gitea to a new version.',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
@@ -18,6 +18,7 @@ setuptools.setup(name='gitea_auto_update',
|
|||||||
"Operating System :: Unix",
|
"Operating System :: Unix",
|
||||||
],
|
],
|
||||||
keywords=['gitea', 'update', 'debian', 'linux'],
|
keywords=['gitea', 'update', 'debian', 'linux'],
|
||||||
|
python_requires='>=3',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'requests',
|
'requests',
|
||||||
'packaging',
|
'packaging',
|
||||||
|
|||||||
Reference in New Issue
Block a user