diff setup.py @ 8368:e5ccabbc3cd7 stable

release: merge default to stable for 0.6.0
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Sat, 02 May 2020 21:20:43 +0200
parents bee01ae374a2
children e3a3fae57343
line wrap: on
line diff
--- a/setup.py	Thu Apr 09 18:03:56 2020 +0200
+++ b/setup.py	Sat May 02 21:20:43 2020 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 import os
 import platform
@@ -9,8 +9,8 @@
 from setuptools.command import sdist
 
 
-if sys.version_info < (2, 6) or sys.version_info >= (3,):
-    raise Exception('Kallithea requires python 2.7')
+if sys.version_info < (3, 6):
+    raise Exception('Kallithea requires Python 3.6 or later')
 
 
 here = os.path.abspath(os.path.dirname(__file__))
@@ -20,16 +20,17 @@
     import re
     matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
     if matches:
-        if not callable(callback_handler):
-            callback_handler = lambda v: v
+        s = eval(matches.groups()[0])
+        if callable(callback_handler):
+            return callback_handler(s)
+        return s
 
-        return callback_handler(eval(matches.groups()[0]))
-
-_meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
+_meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'r')
 _metadata = _meta.read()
 _meta.close()
 
-callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
+def callback(V):
+    return '.'.join(map(str, V[:3])) + '.'.join(V[3:])
 __version__ = _get_meta_var('VERSION', _metadata, callback)
 __license__ = _get_meta_var('__license__', _metadata)
 __author__ = _get_meta_var('__author__', _metadata)
@@ -40,40 +41,40 @@
 is_windows = __platform__ in ['Windows']
 
 requirements = [
-    "alembic >= 0.8.0, < 1.1",
+    "alembic >= 1.0.10, < 1.5",
     "gearbox >= 0.1.0, < 1",
-    "waitress >= 0.8.8, < 1.4",
-    "WebOb >= 1.7, < 1.9",
+    "waitress >= 0.8.8, < 1.5",
+    "WebOb >= 1.8, < 1.9",
     "backlash >= 0.1.2, < 1",
-    "TurboGears2 >= 2.3.10, < 2.5",
+    "TurboGears2 >= 2.4, < 2.5",
     "tgext.routes >= 0.2.0, < 1",
-    "Beaker >= 1.7.0, < 2",
-    "WebHelpers >= 1.3, < 1.4",
+    "Beaker >= 1.10.1, < 2",
     "WebHelpers2 >= 2.0, < 2.1",
-    "FormEncode >= 1.3.0, < 1.4",
-    "SQLAlchemy >= 1.1, < 1.4",
-    "Mako >= 0.9.0, < 1.1",
-    "Pygments >= 2.2.0, < 2.5",
-    "Whoosh >= 2.5.0, < 2.8",
-    "celery >= 3.1, < 4.0", # TODO: celery 4 doesn't work
-    "Babel >= 1.3, < 2.8",
-    "python-dateutil >= 1.5.0, < 2.9",
+    "FormEncode >= 1.3.1, < 1.4",
+    "SQLAlchemy >= 1.2.9, < 1.4",
+    "Mako >= 0.9.1, < 1.2",
+    "Pygments >= 2.2.0, < 2.6",
+    "Whoosh >= 2.7.1, < 2.8",
+    "celery >= 4.3, < 4.5",
+    "Babel >= 1.3, < 2.9",
+    "python-dateutil >= 2.1.0, < 2.9",
     "Markdown >= 2.2.1, < 3.2",
-    "docutils >= 0.11, < 0.15",
+    "docutils >= 0.11, < 0.17",
     "URLObject >= 2.3.4, < 2.5",
-    "Routes >= 1.13, < 2", # TODO: bumping to 2.0 will make test_file_annotation fail
-    "dulwich >= 0.14.1, < 0.20",
-    "mercurial >= 4.5, < 5.3",
-    "decorator >= 3.3.2, < 4.5",
-    "Paste >= 2.0.3, < 3.1",
-    "bleach >= 3.0, < 3.2",
+    "Routes >= 2.0, < 2.5",
+    "dulwich >= 0.19.0, < 0.20",
+    "mercurial >= 5.2, < 5.5",
+    "decorator >= 4.2.1, < 4.5",
+    "Paste >= 2.0.3, < 3.4",
+    "bleach >= 3.0, < 3.1.4",
     "Click >= 7.0, < 8",
-    "ipaddr >= 2.1.10, < 2.3",
+    "ipaddr >= 2.2.0, < 2.3",
+    "paginate >= 0.5, < 0.6",
+    "paginate_sqlalchemy >= 0.3.0, < 0.4",
+    "bcrypt >= 3.1.0, < 3.2",
+    "pip >= 20.0, < 999",
 ]
 
-if not is_windows:
-    requirements.append("bcrypt >= 3.1.0, < 3.2")
-
 dependency_links = [
 ]
 
@@ -84,8 +85,9 @@
     'Intended Audience :: Developers',
     'License :: OSI Approved :: GNU General Public License (GPL)',
     'Operating System :: OS Independent',
-    'Programming Language :: Python',
-    'Programming Language :: Python :: 2.7',
+    'Programming Language :: Python :: 3.6',
+    'Programming Language :: Python :: 3.7',
+    'Programming Language :: Python :: 3.8',
     'Topic :: Software Development :: Version Control',
 ]
 
@@ -110,8 +112,8 @@
     long_description = open(README_FILE).read()
 except IOError as err:
     sys.stderr.write(
-        "[WARNING] Cannot find file specified as long_description (%s)\n"
-        % README_FILE
+        "[WARNING] Cannot find file specified as long_description (%s): %s\n"
+        % (README_FILE, err)
     )
     long_description = description