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