Show More
@@ -1,247 +1,248 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Import early to make sure things are patched up properly |
|
4 | 4 | from setuptools import setup, find_packages |
|
5 | 5 | |
|
6 | 6 | import os |
|
7 | 7 | import sys |
|
8 | 8 | import platform |
|
9 | 9 | |
|
10 | 10 | if sys.version_info < (2, 7): |
|
11 | 11 | raise Exception('RhodeCode requires Python 2.7 or later') |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | here = os.path.abspath(os.path.dirname(__file__)) |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | def _get_meta_var(name, data, callback_handler=None): |
|
18 | 18 | import re |
|
19 | 19 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) |
|
20 | 20 | if matches: |
|
21 | 21 | if not callable(callback_handler): |
|
22 | 22 | callback_handler = lambda v: v |
|
23 | 23 | |
|
24 | 24 | return callback_handler(eval(matches.groups()[0])) |
|
25 | 25 | |
|
26 | 26 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') |
|
27 | 27 | _metadata = _meta.read() |
|
28 | 28 | _meta.close() |
|
29 | 29 | |
|
30 | 30 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) |
|
31 | 31 | __version__ = open(os.path.join('rhodecode', 'VERSION')).read().strip() |
|
32 | 32 | __license__ = _get_meta_var('__license__', _metadata) |
|
33 | 33 | __author__ = _get_meta_var('__author__', _metadata) |
|
34 | 34 | __url__ = _get_meta_var('__url__', _metadata) |
|
35 | 35 | # defines current platform |
|
36 | 36 | __platform__ = platform.system() |
|
37 | 37 | |
|
38 | 38 | # Cygwin has different platform identifiers, but they all contain the |
|
39 | 39 | # term "CYGWIN" |
|
40 | 40 | is_windows = __platform__ == 'Windows' or 'CYGWIN' in __platform__ |
|
41 | 41 | |
|
42 | 42 | requirements = [ |
|
43 | 43 | 'Babel', |
|
44 | 44 | 'Beaker', |
|
45 | 45 | 'FormEncode', |
|
46 | 46 | 'Mako', |
|
47 | 47 | 'Markdown', |
|
48 | 48 | 'MarkupSafe', |
|
49 | 49 | 'MySQL-python', |
|
50 | 50 | 'Paste', |
|
51 | 51 | 'PasteDeploy', |
|
52 | 52 | 'PasteScript', |
|
53 | 53 | 'Pygments', |
|
54 | 54 | 'Pylons', |
|
55 | 55 | 'Pyro4', |
|
56 | 56 | 'Routes', |
|
57 | 57 | 'SQLAlchemy', |
|
58 | 58 | 'Tempita', |
|
59 | 59 | 'URLObject', |
|
60 | 60 | 'WebError', |
|
61 | 61 | 'WebHelpers', |
|
62 | 62 | 'WebHelpers2', |
|
63 | 63 | 'WebOb', |
|
64 | 64 | 'WebTest', |
|
65 | 65 | 'Whoosh', |
|
66 | 66 | 'alembic', |
|
67 | 67 | 'amqplib', |
|
68 | 68 | 'anyjson', |
|
69 | 69 | 'appenlight-client', |
|
70 | 70 | 'authomatic', |
|
71 | 71 | 'backport_ipaddress', |
|
72 | 72 | 'celery', |
|
73 | 73 | 'colander', |
|
74 | 74 | 'decorator', |
|
75 | 75 | 'docutils', |
|
76 | 76 | 'gunicorn', |
|
77 | 77 | 'infrae.cache', |
|
78 | 78 | 'ipython', |
|
79 | 79 | 'iso8601', |
|
80 | 80 | 'kombu', |
|
81 | 81 | 'msgpack-python', |
|
82 | 82 | 'packaging', |
|
83 | 83 | 'psycopg2', |
|
84 | 'py-gfm', | |
|
84 | 85 | 'pycrypto', |
|
85 | 86 | 'pycurl', |
|
86 | 87 | 'pyparsing', |
|
87 | 88 | 'pyramid', |
|
88 | 89 | 'pyramid-debugtoolbar', |
|
89 | 90 | 'pyramid-mako', |
|
90 | 91 | 'pyramid-beaker', |
|
91 | 92 | 'pysqlite', |
|
92 | 93 | 'python-dateutil', |
|
93 | 94 | 'python-ldap', |
|
94 | 95 | 'python-memcached', |
|
95 | 96 | 'python-pam', |
|
96 | 97 | 'recaptcha-client', |
|
97 | 98 | 'repoze.lru', |
|
98 | 99 | 'requests', |
|
99 | 100 | 'simplejson', |
|
100 | 101 | 'waitress', |
|
101 | 102 | 'zope.cachedescriptors', |
|
102 | 103 | 'dogpile.cache', |
|
103 | 104 | 'dogpile.core' |
|
104 | 105 | ] |
|
105 | 106 | |
|
106 | 107 | if is_windows: |
|
107 | 108 | pass |
|
108 | 109 | else: |
|
109 | 110 | requirements.append('psutil') |
|
110 | 111 | requirements.append('py-bcrypt') |
|
111 | 112 | |
|
112 | 113 | test_requirements = [ |
|
113 | 114 | 'WebTest', |
|
114 | 115 | 'configobj', |
|
115 | 116 | 'cssselect', |
|
116 | 117 | 'flake8', |
|
117 | 118 | 'lxml', |
|
118 | 119 | 'mock', |
|
119 | 120 | 'pytest', |
|
120 | 121 | 'pytest-cov', |
|
121 | 122 | 'pytest-runner', |
|
122 | 123 | ] |
|
123 | 124 | |
|
124 | 125 | setup_requirements = [ |
|
125 | 126 | 'PasteScript', |
|
126 | 127 | 'pytest-runner', |
|
127 | 128 | ] |
|
128 | 129 | |
|
129 | 130 | dependency_links = [ |
|
130 | 131 | ] |
|
131 | 132 | |
|
132 | 133 | classifiers = [ |
|
133 | 134 | 'Development Status :: 6 - Mature', |
|
134 | 135 | 'Environment :: Web Environment', |
|
135 | 136 | 'Framework :: Pylons', |
|
136 | 137 | 'Intended Audience :: Developers', |
|
137 | 138 | 'Operating System :: OS Independent', |
|
138 | 139 | 'Programming Language :: Python', |
|
139 | 140 | 'Programming Language :: Python :: 2.7', |
|
140 | 141 | ] |
|
141 | 142 | |
|
142 | 143 | |
|
143 | 144 | # additional files from project that goes somewhere in the filesystem |
|
144 | 145 | # relative to sys.prefix |
|
145 | 146 | data_files = [] |
|
146 | 147 | |
|
147 | 148 | # additional files that goes into package itself |
|
148 | 149 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
149 | 150 | |
|
150 | 151 | description = ('RhodeCode is a fast and powerful management tool ' |
|
151 | 152 | 'for Mercurial and GIT with a built in push/pull server, ' |
|
152 | 153 | 'full text search and code-review.') |
|
153 | 154 | |
|
154 | 155 | keywords = ' '.join([ |
|
155 | 156 | 'rhodecode', 'rhodiumcode', 'mercurial', 'git', 'code review', |
|
156 | 157 | 'repo groups', 'ldap', 'repository management', 'hgweb replacement', |
|
157 | 158 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', |
|
158 | 159 | ]) |
|
159 | 160 | |
|
160 | 161 | # long description |
|
161 | 162 | README_FILE = 'README.rst' |
|
162 | 163 | CHANGELOG_FILE = 'CHANGES.rst' |
|
163 | 164 | try: |
|
164 | 165 | long_description = open(README_FILE).read() + '\n\n' + \ |
|
165 | 166 | open(CHANGELOG_FILE).read() |
|
166 | 167 | |
|
167 | 168 | except IOError, err: |
|
168 | 169 | sys.stderr.write( |
|
169 | 170 | '[WARNING] Cannot find file specified as long_description (%s)\n or ' |
|
170 | 171 | 'changelog (%s) skipping that file' % (README_FILE, CHANGELOG_FILE) |
|
171 | 172 | ) |
|
172 | 173 | long_description = description |
|
173 | 174 | |
|
174 | 175 | # packages |
|
175 | 176 | packages = find_packages() |
|
176 | 177 | |
|
177 | 178 | paster_commands = [ |
|
178 | 179 | 'make-config=rhodecode.lib.paster_commands.make_config:Command', |
|
179 | 180 | 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command', |
|
180 | 181 | 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command', |
|
181 | 182 | 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command', |
|
182 | 183 | 'ishell=rhodecode.lib.paster_commands.ishell:Command', |
|
183 | 184 | 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb', |
|
184 | 185 | 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand', |
|
185 | 186 | ] |
|
186 | 187 | |
|
187 | 188 | setup( |
|
188 | 189 | name='rhodecode-enterprise-ce', |
|
189 | 190 | version=__version__, |
|
190 | 191 | description=description, |
|
191 | 192 | long_description=long_description, |
|
192 | 193 | keywords=keywords, |
|
193 | 194 | license=__license__, |
|
194 | 195 | author=__author__, |
|
195 | 196 | author_email='marcin@rhodecode.com', |
|
196 | 197 | dependency_links=dependency_links, |
|
197 | 198 | url=__url__, |
|
198 | 199 | install_requires=requirements, |
|
199 | 200 | tests_require=test_requirements, |
|
200 | 201 | classifiers=classifiers, |
|
201 | 202 | setup_requires=setup_requirements, |
|
202 | 203 | data_files=data_files, |
|
203 | 204 | packages=packages, |
|
204 | 205 | include_package_data=True, |
|
205 | 206 | package_data=package_data, |
|
206 | 207 | message_extractors={ |
|
207 | 208 | 'rhodecode': [ |
|
208 | 209 | ('**.py', 'python', None), |
|
209 | 210 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
210 | 211 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
211 | 212 | ('public/**', 'ignore', None), |
|
212 | 213 | ] |
|
213 | 214 | }, |
|
214 | 215 | zip_safe=False, |
|
215 | 216 | paster_plugins=['PasteScript', 'Pylons'], |
|
216 | 217 | entry_points={ |
|
217 | 218 | 'enterprise.plugins1': [ |
|
218 | 219 | 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory', |
|
219 | 220 | 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory', |
|
220 | 221 | 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory', |
|
221 | 222 | 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory', |
|
222 | 223 | 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory', |
|
223 | 224 | 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory', |
|
224 | 225 | 'token=rhodecode.authentication.plugins.auth_token:plugin_factory', |
|
225 | 226 | ], |
|
226 | 227 | 'paste.app_factory': [ |
|
227 | 228 | 'main=rhodecode.config.middleware:make_pyramid_app', |
|
228 | 229 | 'pylons=rhodecode.config.middleware:make_app', |
|
229 | 230 | ], |
|
230 | 231 | 'paste.app_install': [ |
|
231 | 232 | 'main=pylons.util:PylonsInstaller', |
|
232 | 233 | 'pylons=pylons.util:PylonsInstaller', |
|
233 | 234 | ], |
|
234 | 235 | 'paste.global_paster_command': paster_commands, |
|
235 | 236 | 'pytest11': [ |
|
236 | 237 | 'pylons=rhodecode.tests.pylons_plugin', |
|
237 | 238 | 'enterprise=rhodecode.tests.plugin', |
|
238 | 239 | ], |
|
239 | 240 | 'console_scripts': [ |
|
240 | 241 | 'rcserver=rhodecode.rcserver:main', |
|
241 | 242 | ], |
|
242 | 243 | 'beaker.backends': [ |
|
243 | 244 | 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase', |
|
244 | 245 | 'memorylru_debug=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerDebug' |
|
245 | 246 | ] |
|
246 | 247 | }, |
|
247 | 248 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now