Show More
@@ -1,256 +1,254 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | # Import early to make sure things are patched up properly |
|
22 | 22 | from setuptools import setup, find_packages |
|
23 | 23 | |
|
24 | 24 | import os |
|
25 | 25 | import sys |
|
26 | 26 | import pkgutil |
|
27 | 27 | import platform |
|
28 | 28 | |
|
29 | 29 | from pip.download import PipSession |
|
30 | 30 | from pip.req import parse_requirements |
|
31 | 31 | |
|
32 | 32 | from codecs import open |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | if sys.version_info < (2, 7): |
|
36 | 36 | raise Exception('RhodeCode requires Python 2.7 or later') |
|
37 | 37 | |
|
38 | 38 | here = os.path.abspath(os.path.dirname(__file__)) |
|
39 | 39 | |
|
40 | 40 | # defines current platform |
|
41 | 41 | __platform__ = platform.system() |
|
42 | 42 | __license__ = 'AGPLv3, and Commercial License' |
|
43 | 43 | __author__ = 'RhodeCode GmbH' |
|
44 | 44 | __url__ = 'https://code.rhodecode.com' |
|
45 | 45 | is_windows = __platform__ in ('Windows',) |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | def _get_requirements(req_filename, exclude=None, extras=None): |
|
49 | 49 | extras = extras or [] |
|
50 | 50 | exclude = exclude or [] |
|
51 | 51 | |
|
52 | 52 | try: |
|
53 | 53 | parsed = parse_requirements( |
|
54 | 54 | os.path.join(here, req_filename), session=PipSession()) |
|
55 | 55 | except TypeError: |
|
56 | 56 | # try pip < 6.0.0, that doesn't support session |
|
57 | 57 | parsed = parse_requirements(os.path.join(here, req_filename)) |
|
58 | 58 | |
|
59 | 59 | requirements = [] |
|
60 | 60 | for ir in parsed: |
|
61 | 61 | if ir.req and ir.name not in exclude: |
|
62 | 62 | requirements.append(str(ir.req)) |
|
63 | 63 | return requirements + extras |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | # requirements extract |
|
67 | 67 | setup_requirements = ['PasteScript', 'pytest-runner'] |
|
68 | 68 | install_requirements = _get_requirements( |
|
69 | 69 | 'requirements.txt', exclude=['setuptools']) |
|
70 | 70 | test_requirements = _get_requirements( |
|
71 | 71 | 'requirements_test.txt', extras=['configobj']) |
|
72 | 72 | |
|
73 | 73 | install_requirements = [ |
|
74 | 74 | 'Babel', |
|
75 | 75 | 'Beaker', |
|
76 | 76 | 'FormEncode', |
|
77 | 77 | 'Mako', |
|
78 | 78 | 'Markdown', |
|
79 | 79 | 'MarkupSafe', |
|
80 | 80 | 'MySQL-python', |
|
81 | 81 | 'Paste', |
|
82 | 82 | 'PasteDeploy', |
|
83 | 83 | 'PasteScript', |
|
84 | 84 | 'Pygments', |
|
85 | 85 | 'pygments-markdown-lexer', |
|
86 | 86 | 'Pylons', |
|
87 | 87 | 'Routes', |
|
88 | 88 | 'SQLAlchemy', |
|
89 | 89 | 'Tempita', |
|
90 | 90 | 'URLObject', |
|
91 | 91 | 'WebError', |
|
92 | 92 | 'WebHelpers', |
|
93 | 93 | 'WebHelpers2', |
|
94 | 94 | 'WebOb', |
|
95 | 95 | 'WebTest', |
|
96 | 96 | 'Whoosh', |
|
97 | 97 | 'alembic', |
|
98 | 98 | 'amqplib', |
|
99 | 99 | 'anyjson', |
|
100 | 100 | 'appenlight-client', |
|
101 | 101 | 'authomatic', |
|
102 | 102 | 'cssselect', |
|
103 | 103 | 'celery', |
|
104 | 104 | 'channelstream', |
|
105 | 105 | 'colander', |
|
106 | 106 | 'decorator', |
|
107 | 107 | 'deform', |
|
108 | 108 | 'docutils', |
|
109 | 109 | 'gevent', |
|
110 | 110 | 'gunicorn', |
|
111 | 111 | 'infrae.cache', |
|
112 | 112 | 'ipython', |
|
113 | 113 | 'iso8601', |
|
114 | 114 | 'kombu', |
|
115 | 115 | 'lxml', |
|
116 | 116 | 'msgpack-python', |
|
117 | 117 | 'nbconvert', |
|
118 | 118 | 'packaging', |
|
119 | 119 | 'psycopg2', |
|
120 | 120 | 'py-gfm', |
|
121 | 121 | 'pycrypto', |
|
122 | 122 | 'pycurl', |
|
123 | 123 | 'pyparsing', |
|
124 | 124 | 'pyramid', |
|
125 | 125 | 'pyramid-debugtoolbar', |
|
126 | 126 | 'pyramid-mako', |
|
127 | 127 | 'pyramid-beaker', |
|
128 | 128 | 'pysqlite', |
|
129 | 129 | 'python-dateutil', |
|
130 | 130 | 'python-ldap', |
|
131 | 131 | 'python-memcached', |
|
132 | 132 | 'python-pam', |
|
133 | 133 | 'recaptcha-client', |
|
134 | 134 | 'repoze.lru', |
|
135 | 135 | 'requests', |
|
136 | 136 | 'simplejson', |
|
137 | 137 | 'subprocess32', |
|
138 | 138 | 'waitress', |
|
139 | 139 | 'zope.cachedescriptors', |
|
140 | 140 | 'dogpile.cache', |
|
141 | 141 | 'dogpile.core', |
|
142 | 142 | 'psutil', |
|
143 | 143 | 'py-bcrypt', |
|
144 | 144 | ] |
|
145 | 145 | |
|
146 | 146 | |
|
147 | 147 | def get_version(): |
|
148 | 148 | version = pkgutil.get_data('rhodecode', 'VERSION') |
|
149 | 149 | return version.strip() |
|
150 | 150 | |
|
151 | 151 | |
|
152 | 152 | # additional files that goes into package itself |
|
153 | 153 | package_data = { |
|
154 | 154 | '': ['*.txt', '*.rst'], |
|
155 | 155 | 'configs': ['*.ini'], |
|
156 | 156 | 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ], |
|
157 | 157 | } |
|
158 | 158 | |
|
159 | 159 | description = 'Source Code Management Platform' |
|
160 | 160 | keywords = ' '.join([ |
|
161 | 161 | 'rhodecode', 'mercurial', 'git', 'svn', |
|
162 | 162 | 'code review', |
|
163 | 163 | 'repo groups', 'ldap', 'repository management', 'hgweb', |
|
164 | 164 | 'hgwebdir', 'gitweb', 'serving hgweb', |
|
165 | 165 | ]) |
|
166 | 166 | |
|
167 | 167 | |
|
168 | 168 | # README/DESCRIPTION generation |
|
169 | 169 | readme_file = 'README.rst' |
|
170 | 170 | changelog_file = 'CHANGES.rst' |
|
171 | 171 | try: |
|
172 | 172 | long_description = open(readme_file).read() + '\n\n' + \ |
|
173 | 173 | open(changelog_file).read() |
|
174 | 174 | except IOError as err: |
|
175 | 175 | sys.stderr.write( |
|
176 | 176 | "[WARNING] Cannot find file specified as long_description (%s)\n " |
|
177 | 177 | "or changelog (%s) skipping that file" % (readme_file, changelog_file)) |
|
178 | 178 | long_description = description |
|
179 | 179 | |
|
180 | 180 | |
|
181 | 181 | setup( |
|
182 | 182 | name='rhodecode-enterprise-ce', |
|
183 | 183 | version=get_version(), |
|
184 | 184 | description=description, |
|
185 | 185 | long_description=long_description, |
|
186 | 186 | keywords=keywords, |
|
187 | 187 | license=__license__, |
|
188 | 188 | author=__author__, |
|
189 | 189 | author_email='marcin@rhodecode.com', |
|
190 | 190 | url=__url__, |
|
191 | 191 | setup_requires=setup_requirements, |
|
192 | 192 | install_requires=install_requirements, |
|
193 | 193 | tests_require=test_requirements, |
|
194 | 194 | zip_safe=False, |
|
195 | 195 | packages=find_packages(exclude=["docs", "tests*"]), |
|
196 | 196 | package_data=package_data, |
|
197 | 197 | include_package_data=True, |
|
198 | 198 | classifiers=[ |
|
199 | 199 | 'Development Status :: 6 - Mature', |
|
200 | 200 | 'Environment :: Web Environment', |
|
201 | 201 | 'Intended Audience :: Developers', |
|
202 | 202 | 'Operating System :: OS Independent', |
|
203 | 203 | 'Topic :: Software Development :: Version Control', |
|
204 | 204 | 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)', |
|
205 | 205 | 'Programming Language :: Python :: 2.7', |
|
206 | 206 | ], |
|
207 | 207 | message_extractors={ |
|
208 | 208 | 'rhodecode': [ |
|
209 | 209 | ('**.py', 'python', None), |
|
210 | 210 | ('**.js', 'javascript', None), |
|
211 | 211 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
212 | 212 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
213 | 213 | ('public/**', 'ignore', None), |
|
214 | 214 | ] |
|
215 | 215 | }, |
|
216 | 216 | paster_plugins=['PasteScript', 'Pylons'], |
|
217 | 217 | entry_points={ |
|
218 | 218 | 'enterprise.plugins1': [ |
|
219 | 219 | 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory', |
|
220 | 220 | 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory', |
|
221 | 221 | 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory', |
|
222 | 222 | 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory', |
|
223 | 223 | 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory', |
|
224 | 224 | 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory', |
|
225 | 225 | 'token=rhodecode.authentication.plugins.auth_token:plugin_factory', |
|
226 | 226 | ], |
|
227 | 227 | 'paste.app_factory': [ |
|
228 | 228 | 'main=rhodecode.config.middleware:make_pyramid_app', |
|
229 | 229 | 'pylons=rhodecode.config.middleware:make_app', |
|
230 | 230 | ], |
|
231 | 231 | 'paste.app_install': [ |
|
232 | 232 | 'main=pylons.util:PylonsInstaller', |
|
233 | 233 | 'pylons=pylons.util:PylonsInstaller', |
|
234 | 234 | ], |
|
235 | 235 | 'paste.global_paster_command': [ |
|
236 | 236 | 'make-config=rhodecode.lib.paster_commands.make_config:Command', |
|
237 | 237 | 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command', |
|
238 | 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command', | |
|
239 | 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command', | |
|
240 | 238 | 'ishell=rhodecode.lib.paster_commands.ishell:Command', |
|
241 | 239 | 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb', |
|
242 | 240 | 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand', |
|
243 | 241 | ], |
|
244 | 242 | 'pytest11': [ |
|
245 | 243 | 'pylons=rhodecode.tests.pylons_plugin', |
|
246 | 244 | 'enterprise=rhodecode.tests.plugin', |
|
247 | 245 | ], |
|
248 | 246 | 'console_scripts': [ |
|
249 | 247 | 'rcserver=rhodecode.rcserver:main', |
|
250 | 248 | ], |
|
251 | 249 | 'beaker.backends': [ |
|
252 | 250 | 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase', |
|
253 | 251 | 'memorylru_debug=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerDebug' |
|
254 | 252 | ] |
|
255 | 253 | }, |
|
256 | 254 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now