##// END OF EJS Templates
setup.py: support Paste 3.0.x...
Thomas De Schampheleire -
r7418:e7d63736 default
parent child Browse files
Show More
@@ -1,161 +1,161 b''
1 1 #!/usr/bin/env python2
2 2 # -*- coding: utf-8 -*-
3 3 import os
4 4 import sys
5 5 import platform
6 6
7 7 if sys.version_info < (2, 6) or sys.version_info >= (3,):
8 8 raise Exception('Kallithea requires python 2.6 or 2.7')
9 9
10 10
11 11 here = os.path.abspath(os.path.dirname(__file__))
12 12
13 13
14 14 def _get_meta_var(name, data, callback_handler=None):
15 15 import re
16 16 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
17 17 if matches:
18 18 if not callable(callback_handler):
19 19 callback_handler = lambda v: v
20 20
21 21 return callback_handler(eval(matches.groups()[0]))
22 22
23 23 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
24 24 _metadata = _meta.read()
25 25 _meta.close()
26 26
27 27 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
28 28 __version__ = _get_meta_var('VERSION', _metadata, callback)
29 29 __license__ = _get_meta_var('__license__', _metadata)
30 30 __author__ = _get_meta_var('__author__', _metadata)
31 31 __url__ = _get_meta_var('__url__', _metadata)
32 32 # defines current platform
33 33 __platform__ = platform.system()
34 34
35 35 is_windows = __platform__ in ['Windows']
36 36
37 37 requirements = [
38 38 "alembic >= 0.8.0, < 1.1",
39 39 "gearbox < 1",
40 40 "waitress >= 0.8.8, < 1.2",
41 41 "WebOb >= 1.7, < 1.8", # turbogears2 2.3.12 requires WebOb<1.8.0
42 42 "backlash >= 0.1.2, < 1",
43 43 "TurboGears2 >= 2.3.10, < 3",
44 44 "tgext.routes >= 0.2.0, < 1",
45 45 "Beaker >= 1.7.0, < 2",
46 46 "WebHelpers >= 1.3, < 1.4",
47 47 "FormEncode >= 1.2.4, < 1.4",
48 48 "SQLAlchemy >= 1.1, < 1.3",
49 49 "Mako >= 0.9.0, < 1.1",
50 50 "Pygments >= 1.5, < 2.3",
51 51 "Whoosh >= 2.5.0, < 2.8",
52 52 "celery >= 3.1, < 4.0", # celery 4 doesn't work
53 53 "Babel >= 0.9.6, < 2.7",
54 54 "python-dateutil >= 1.5.0, < 2.8",
55 55 "Markdown >= 2.2.1, < 2.7",
56 56 "docutils >= 0.8.1, < 0.15",
57 57 "URLObject >= 2.3.4, < 2.5",
58 58 "Routes >= 1.13, < 2",
59 59 "dulwich >= 0.14.1, < 0.20",
60 60 "mercurial >= 4.1.1, < 4.9",
61 61 "decorator >= 3.3.2, < 4.4",
62 "Paste >= 2.0.3, < 3",
62 "Paste >= 2.0.3, < 3.1",
63 63 "bleach >= 3.0, < 3.1",
64 64 "Click >= 7.0, < 8",
65 65 ]
66 66
67 67 if sys.version_info < (2, 7):
68 68 requirements.append("importlib == 1.0.1")
69 69 requirements.append("argparse")
70 70
71 71 if not is_windows:
72 72 requirements.append("bcrypt >= 3.1.0, < 3.2")
73 73
74 74 dependency_links = [
75 75 ]
76 76
77 77 classifiers = [
78 78 'Development Status :: 4 - Beta',
79 79 'Environment :: Web Environment',
80 80 'Framework :: Pylons',
81 81 'Intended Audience :: Developers',
82 82 'License :: OSI Approved :: GNU General Public License (GPL)',
83 83 'Operating System :: OS Independent',
84 84 'Programming Language :: Python',
85 85 'Programming Language :: Python :: 2.6',
86 86 'Programming Language :: Python :: 2.7',
87 87 'Topic :: Software Development :: Version Control',
88 88 ]
89 89
90 90
91 91 # additional files from project that goes somewhere in the filesystem
92 92 # relative to sys.prefix
93 93 data_files = []
94 94
95 95 description = ('Kallithea is a fast and powerful management tool '
96 96 'for Mercurial and Git with a built in push/pull server, '
97 97 'full text search and code-review.')
98 98
99 99 keywords = ' '.join([
100 100 'kallithea', 'mercurial', 'git', 'code review',
101 101 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
102 102 'hgwebdir', 'gitweb replacement', 'serving hgweb',
103 103 ])
104 104
105 105 # long description
106 106 README_FILE = 'README.rst'
107 107 try:
108 108 long_description = open(README_FILE).read()
109 109 except IOError as err:
110 110 sys.stderr.write(
111 111 "[WARNING] Cannot find file specified as long_description (%s)\n"
112 112 % README_FILE
113 113 )
114 114 long_description = description
115 115
116 116 import setuptools
117 117
118 118 # monkey patch setuptools to use distutils owner/group functionality
119 119 from setuptools.command import sdist
120 120 sdist_org = sdist.sdist
121 121 class sdist_new(sdist_org):
122 122 def initialize_options(self):
123 123 sdist_org.initialize_options(self)
124 124 self.owner = self.group = 'root'
125 125 sdist.sdist = sdist_new
126 126
127 127 packages = setuptools.find_packages(exclude=['ez_setup'])
128 128
129 129 setuptools.setup(
130 130 name='Kallithea',
131 131 version=__version__,
132 132 description=description,
133 133 long_description=long_description,
134 134 keywords=keywords,
135 135 license=__license__,
136 136 author=__author__,
137 137 author_email='kallithea@sfconservancy.org',
138 138 dependency_links=dependency_links,
139 139 url=__url__,
140 140 install_requires=requirements,
141 141 classifiers=classifiers,
142 142 data_files=data_files,
143 143 packages=packages,
144 144 include_package_data=True,
145 145 message_extractors={'kallithea': [
146 146 ('**.py', 'python', None),
147 147 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
148 148 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
149 149 ('public/**', 'ignore', None)]},
150 150 zip_safe=False,
151 151 entry_points="""
152 152 [console_scripts]
153 153 kallithea-api = kallithea.bin.kallithea_api:main
154 154 kallithea-gist = kallithea.bin.kallithea_gist:main
155 155 kallithea-config = kallithea.bin.kallithea_config:main
156 156 kallithea-cli = kallithea.bin.kallithea_cli:cli
157 157
158 158 [paste.app_factory]
159 159 main = kallithea.config.middleware:make_app
160 160 """,
161 161 )
General Comments 0
You need to be logged in to leave comments. Login now