comparison setup.py @ 8364:68d4aae74194 i18n

Merge default pre 0.6
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 27 Apr 2020 13:25:28 +0200
parents bee01ae374a2
children e3a3fae57343
comparison
equal deleted inserted replaced
8219:826810fb830e 8364:68d4aae74194
18 18
19 def _get_meta_var(name, data, callback_handler=None): 19 def _get_meta_var(name, data, callback_handler=None):
20 import re 20 import re
21 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) 21 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
22 if matches: 22 if matches:
23 if not callable(callback_handler): 23 s = eval(matches.groups()[0])
24 callback_handler = lambda v: v 24 if callable(callback_handler):
25 25 return callback_handler(s)
26 return callback_handler(eval(matches.groups()[0])) 26 return s
27 27
28 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'r') 28 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'r')
29 _metadata = _meta.read() 29 _metadata = _meta.read()
30 _meta.close() 30 _meta.close()
31 31
32 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) 32 def callback(V):
33 return '.'.join(map(str, V[:3])) + '.'.join(V[3:])
33 __version__ = _get_meta_var('VERSION', _metadata, callback) 34 __version__ = _get_meta_var('VERSION', _metadata, callback)
34 __license__ = _get_meta_var('__license__', _metadata) 35 __license__ = _get_meta_var('__license__', _metadata)
35 __author__ = _get_meta_var('__author__', _metadata) 36 __author__ = _get_meta_var('__author__', _metadata)
36 __url__ = _get_meta_var('__url__', _metadata) 37 __url__ = _get_meta_var('__url__', _metadata)
37 # defines current platform 38 # defines current platform
38 __platform__ = platform.system() 39 __platform__ = platform.system()
39 40
40 is_windows = __platform__ in ['Windows'] 41 is_windows = __platform__ in ['Windows']
41 42
42 requirements = [ 43 requirements = [
43 "alembic >= 1.0.10, < 1.1", 44 "alembic >= 1.0.10, < 1.5",
44 "gearbox >= 0.1.0, < 1", 45 "gearbox >= 0.1.0, < 1",
45 "waitress >= 0.8.8, < 1.4", 46 "waitress >= 0.8.8, < 1.5",
46 "WebOb >= 1.8, < 1.9", 47 "WebOb >= 1.8, < 1.9",
47 "backlash >= 0.1.2, < 1", 48 "backlash >= 0.1.2, < 1",
48 "TurboGears2 >= 2.4, < 2.5", 49 "TurboGears2 >= 2.4, < 2.5",
49 "tgext.routes >= 0.2.0, < 1", 50 "tgext.routes >= 0.2.0, < 1",
50 "Beaker >= 1.10.1, < 2", 51 "Beaker >= 1.10.1, < 2",
51 "WebHelpers2 >= 2.0, < 2.1", 52 "WebHelpers2 >= 2.0, < 2.1",
52 "FormEncode >= 1.3.1, < 1.4", 53 "FormEncode >= 1.3.1, < 1.4",
53 "SQLAlchemy >= 1.2.9, < 1.4", 54 "SQLAlchemy >= 1.2.9, < 1.4",
54 "Mako >= 0.9.1, < 1.1", 55 "Mako >= 0.9.1, < 1.2",
55 "Pygments >= 2.2.0, < 2.5", 56 "Pygments >= 2.2.0, < 2.6",
56 "Whoosh >= 2.7.1, < 2.8", 57 "Whoosh >= 2.7.1, < 2.8",
57 "celery >= 3.1, < 4.0", # TODO: celery 4 doesn't work 58 "celery >= 4.3, < 4.5",
58 "Babel >= 1.3, < 2.8", 59 "Babel >= 1.3, < 2.9",
59 "python-dateutil >= 2.1.0, < 2.9", 60 "python-dateutil >= 2.1.0, < 2.9",
60 "Markdown >= 2.2.1, < 3.2", 61 "Markdown >= 2.2.1, < 3.2",
61 "docutils >= 0.11, < 0.15", 62 "docutils >= 0.11, < 0.17",
62 "URLObject >= 2.3.4, < 2.5", 63 "URLObject >= 2.3.4, < 2.5",
63 "Routes >= 2.0, < 2.5", 64 "Routes >= 2.0, < 2.5",
64 "dulwich >= 0.19.0, < 0.20", 65 "dulwich >= 0.19.0, < 0.20",
65 "mercurial >= 5.2, < 5.4", 66 "mercurial >= 5.2, < 5.5",
66 "decorator >= 4.2.1, < 4.5", 67 "decorator >= 4.2.1, < 4.5",
67 "Paste >= 2.0.3, < 3.1", 68 "Paste >= 2.0.3, < 3.4",
68 "bleach >= 3.0, < 3.2", 69 "bleach >= 3.0, < 3.1.4",
69 "Click >= 7.0, < 8", 70 "Click >= 7.0, < 8",
70 "ipaddr >= 2.2.0, < 2.3", 71 "ipaddr >= 2.2.0, < 2.3",
71 "paginate >= 0.5, < 0.6", 72 "paginate >= 0.5, < 0.6",
72 "paginate_sqlalchemy >= 0.3.0, < 0.4", 73 "paginate_sqlalchemy >= 0.3.0, < 0.4",
74 "bcrypt >= 3.1.0, < 3.2",
75 "pip >= 20.0, < 999",
73 ] 76 ]
74
75 if not is_windows:
76 requirements.append("bcrypt >= 3.1.0, < 3.2")
77 77
78 dependency_links = [ 78 dependency_links = [
79 ] 79 ]
80 80
81 classifiers = [ 81 classifiers = [
110 README_FILE = 'README.rst' 110 README_FILE = 'README.rst'
111 try: 111 try:
112 long_description = open(README_FILE).read() 112 long_description = open(README_FILE).read()
113 except IOError as err: 113 except IOError as err:
114 sys.stderr.write( 114 sys.stderr.write(
115 "[WARNING] Cannot find file specified as long_description (%s)\n" 115 "[WARNING] Cannot find file specified as long_description (%s): %s\n"
116 % README_FILE 116 % (README_FILE, err)
117 ) 117 )
118 long_description = description 118 long_description = description
119 119
120 120
121 sdist_org = sdist.sdist 121 sdist_org = sdist.sdist