Show More
@@ -1504,7 +1504,7 b'' | |||
|
1504 | 1504 | propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments pygments-markdown-lexer Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson subprocess32 waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt]; |
|
1505 | 1505 | src = ./.; |
|
1506 | 1506 | meta = { |
|
1507 | license = [ { fullName = "AGPLv3, and Commercial License"; } ]; | |
|
1507 | license = [ { fullName = "Affero GNU General Public License v3 or later (AGPLv3+)"; } { fullName = "AGPLv3, and Commercial License"; } ]; | |
|
1508 | 1508 | }; |
|
1509 | 1509 | }; |
|
1510 | 1510 | rhodecode-tools = super.buildPythonPackage { |
@@ -1,67 +1,76 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | # Copyright (C) 2010-2016 RhodeCode GmbH | |
|
4 | # | |
|
5 | # This program is free software: you can redistribute it and/or modify | |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
|
7 | # (only), as published by the Free Software Foundation. | |
|
8 | # | |
|
9 | # This program is distributed in the hope that it will be useful, | |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
12 | # GNU General Public License for more details. | |
|
13 | # | |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
16 | # | |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
|
20 | ||
|
3 | 21 | # Import early to make sure things are patched up properly |
|
4 | 22 | from setuptools import setup, find_packages |
|
5 | 23 | |
|
6 | 24 | import os |
|
7 | 25 | import sys |
|
26 | import pkgutil | |
|
8 | 27 | import platform |
|
9 | 28 | |
|
10 | 29 | from pip.download import PipSession |
|
11 | 30 | from pip.req import parse_requirements |
|
12 | 31 | |
|
32 | from codecs import open | |
|
33 | ||
|
13 | 34 | |
|
14 | 35 | if sys.version_info < (2, 7): |
|
15 | 36 | raise Exception('RhodeCode requires Python 2.7 or later') |
|
16 | 37 | |
|
17 | 38 | here = os.path.abspath(os.path.dirname(__file__)) |
|
18 | 39 | |
|
19 | try: | |
|
20 | install_reqs = parse_requirements( | |
|
21 | os.path.join(here, 'requirements.txt'), session=PipSession()) | |
|
22 | except TypeError: | |
|
23 | # try pip < 6.0.0, that doesn't support session | |
|
24 | install_reqs = parse_requirements( | |
|
25 | os.path.join(here, 'requirements.txt')) | |
|
26 | install_requirements = [str(ir.req) for ir in install_reqs] | |
|
27 | ||
|
28 | try: | |
|
29 | test_reqs = parse_requirements( | |
|
30 | os.path.join(here, 'requirements_test.txt'), session=PipSession()) | |
|
31 | except TypeError: | |
|
32 | # try pip < 6.0.0, that doesn't support session | |
|
33 | test_reqs = parse_requirements( | |
|
34 | os.path.join(here, 'requirements_test.txt')) | |
|
35 | extras = ['configobj'] | |
|
36 | test_requirements = [str(ir.req) for ir in test_reqs] + extras | |
|
40 | # defines current platform | |
|
41 | __platform__ = platform.system() | |
|
42 | __license__ = 'AGPLv3, and Commercial License' | |
|
43 | __author__ = 'RhodeCode GmbH' | |
|
44 | __url__ = 'https://code.rhodecode.com' | |
|
45 | is_windows = __platform__ in ('Windows',) | |
|
37 | 46 | |
|
38 | 47 | |
|
39 | def _get_meta_var(name, data, callback_handler=None): | |
|
40 | import re | |
|
41 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) | |
|
42 | if matches: | |
|
43 | if not callable(callback_handler): | |
|
44 | callback_handler = lambda v: v | |
|
48 | def _get_requirements(req_filename, exclude=None, extras=None): | |
|
49 | extras = extras or [] | |
|
50 | exclude = exclude or [] | |
|
45 | 51 | |
|
46 | return callback_handler(eval(matches.groups()[0])) | |
|
47 | ||
|
48 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') | |
|
49 | _metadata = _meta.read() | |
|
50 | _meta.close() | |
|
52 | try: | |
|
53 | parsed = parse_requirements( | |
|
54 | os.path.join(here, req_filename), session=PipSession()) | |
|
55 | except TypeError: | |
|
56 | # try pip < 6.0.0, that doesn't support session | |
|
57 | parsed = parse_requirements(os.path.join(here, req_filename)) | |
|
51 | 58 | |
|
52 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) | |
|
53 | __version__ = open(os.path.join('rhodecode', 'VERSION')).read().strip() | |
|
54 | __license__ = _get_meta_var('__license__', _metadata) | |
|
55 | __author__ = _get_meta_var('__author__', _metadata) | |
|
56 | __url__ = _get_meta_var('__url__', _metadata) | |
|
57 | # defines current platform | |
|
58 | __platform__ = platform.system() | |
|
59 | requirements = [] | |
|
60 | for ir in parsed: | |
|
61 | if ir.req and ir.name not in exclude: | |
|
62 | requirements.append(str(ir.req)) | |
|
63 | return requirements + extras | |
|
64 | ||
|
59 | 65 | |
|
60 | # Cygwin has different platform identifiers, but they all contain the | |
|
61 | # term "CYGWIN" | |
|
62 | is_windows = __platform__ == 'Windows' or 'CYGWIN' in __platform__ | |
|
66 | # requirements extract | |
|
67 | setup_requirements = ['PasteScript', 'pytest-runner'] | |
|
68 | install_requirements = _get_requirements( | |
|
69 | 'requirements.txt', exclude=['setuptools']) | |
|
70 | test_requirements = _get_requirements( | |
|
71 | 'requirements_test.txt', extras=['configobj']) | |
|
63 | 72 | |
|
64 | requirements = [ | |
|
73 | install_requirements = [ | |
|
65 | 74 | 'Babel', |
|
66 | 75 | 'Beaker', |
|
67 | 76 | 'FormEncode', |
@@ -128,98 +137,72 b' requirements = [' | |||
|
128 | 137 | 'waitress', |
|
129 | 138 | 'zope.cachedescriptors', |
|
130 | 139 | 'dogpile.cache', |
|
131 | 'dogpile.core' | |
|
132 | ] | |
|
133 | ||
|
134 | if is_windows: | |
|
135 | pass | |
|
136 | else: | |
|
137 | requirements.append('psutil') | |
|
138 | requirements.append('py-bcrypt') | |
|
139 | ||
|
140 | ||
|
141 | setup_requirements = [ | |
|
142 | 'PasteScript', | |
|
143 | 'pytest-runner', | |
|
144 | ] | |
|
145 | ||
|
146 | dependency_links = [ | |
|
147 | ] | |
|
148 | ||
|
149 | classifiers = [ | |
|
150 | 'Development Status :: 6 - Mature', | |
|
151 | 'Environment :: Web Environment', | |
|
152 | 'Framework :: Pylons', | |
|
153 | 'Intended Audience :: Developers', | |
|
154 | 'Operating System :: OS Independent', | |
|
155 | 'Programming Language :: Python', | |
|
156 | 'Programming Language :: Python :: 2.7', | |
|
140 | 'dogpile.core', | |
|
141 | 'psutil', | |
|
142 | 'py-bcrypt', | |
|
157 | 143 | ] |
|
158 | 144 | |
|
159 | 145 | |
|
160 | # additional files from project that goes somewhere in the filesystem | |
|
161 | # relative to sys.prefix | |
|
162 | data_files = [] | |
|
146 | def get_version(): | |
|
147 | version = pkgutil.get_data('rhodecode', 'VERSION') | |
|
148 | return version.strip() | |
|
149 | ||
|
163 | 150 | |
|
164 | 151 | # additional files that goes into package itself |
|
165 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } | |
|
152 | package_data = { | |
|
153 | '': ['*.txt', '*.rst'], | |
|
154 | 'configs': ['*.ini'], | |
|
155 | 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ], | |
|
156 | } | |
|
166 | 157 | |
|
167 |
description = |
|
|
168 | 'for Mercurial and GIT with a built in push/pull server, ' | |
|
169 | 'full text search and code-review.') | |
|
170 | ||
|
158 | description = 'Source Code Management Platform' | |
|
171 | 159 | keywords = ' '.join([ |
|
172 |
'rhodecode |
|
|
173 | 'repo groups', 'ldap', 'repository management', 'hgweb replacement', | |
|
174 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', | |
|
160 | 'rhodecode', 'mercurial', 'git', 'svn', | |
|
161 | 'code review', | |
|
162 | 'repo groups', 'ldap', 'repository management', 'hgweb', | |
|
163 | 'hgwebdir', 'gitweb', 'serving hgweb', | |
|
175 | 164 | ]) |
|
176 | 165 | |
|
177 | # long description | |
|
178 | README_FILE = 'README.rst' | |
|
179 | CHANGELOG_FILE = 'CHANGES.rst' | |
|
166 | ||
|
167 | # README/DESCRIPTION generation | |
|
168 | readme_file = 'README.rst' | |
|
169 | changelog_file = 'CHANGES.rst' | |
|
180 | 170 | try: |
|
181 |
long_description = open( |
|
|
182 |
open( |
|
|
183 | ||
|
184 | except IOError, err: | |
|
171 | long_description = open(readme_file).read() + '\n\n' + \ | |
|
172 | open(changelog_file).read() | |
|
173 | except IOError as err: | |
|
185 | 174 | sys.stderr.write( |
|
186 |
|
|
|
187 |
|
|
|
188 | ) | |
|
175 | "[WARNING] Cannot find file specified as long_description (%s)\n " | |
|
176 | "or changelog (%s) skipping that file" % (readme_file, changelog_file)) | |
|
189 | 177 | long_description = description |
|
190 | 178 | |
|
191 | # packages | |
|
192 | packages = find_packages() | |
|
193 | ||
|
194 | paster_commands = [ | |
|
195 | 'make-config=rhodecode.lib.paster_commands.make_config:Command', | |
|
196 | 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command', | |
|
197 | 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command', | |
|
198 | 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command', | |
|
199 | 'ishell=rhodecode.lib.paster_commands.ishell:Command', | |
|
200 | 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb', | |
|
201 | 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand', | |
|
202 | ] | |
|
203 | 179 | |
|
204 | 180 | setup( |
|
205 | 181 | name='rhodecode-enterprise-ce', |
|
206 |
version= |
|
|
182 | version=get_version(), | |
|
207 | 183 | description=description, |
|
208 | 184 | long_description=long_description, |
|
209 | 185 | keywords=keywords, |
|
210 | 186 | license=__license__, |
|
211 | 187 | author=__author__, |
|
212 | 188 | author_email='marcin@rhodecode.com', |
|
213 | dependency_links=dependency_links, | |
|
214 | 189 | url=__url__, |
|
215 |
|
|
|
190 | setup_requires=setup_requirements, | |
|
191 | install_requires=install_requirements, | |
|
216 | 192 | tests_require=test_requirements, |
|
217 | classifiers=classifiers, | |
|
218 | setup_requires=setup_requirements, | |
|
219 | data_files=data_files, | |
|
220 | packages=packages, | |
|
193 | zip_safe=False, | |
|
194 | packages=find_packages(exclude=["docs", "tests*"]), | |
|
195 | package_data=package_data, | |
|
221 | 196 | include_package_data=True, |
|
222 | package_data=package_data, | |
|
197 | classifiers=[ | |
|
198 | 'Development Status :: 6 - Mature', | |
|
199 | 'Environment :: Web Environment', | |
|
200 | 'Intended Audience :: Developers', | |
|
201 | 'Operating System :: OS Independent', | |
|
202 | 'Topic :: Software Development :: Version Control', | |
|
203 | 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)', | |
|
204 | 'Programming Language :: Python :: 2.7', | |
|
205 | ], | |
|
223 | 206 | message_extractors={ |
|
224 | 207 | 'rhodecode': [ |
|
225 | 208 | ('**.py', 'python', None), |
@@ -229,7 +212,6 b' setup(' | |||
|
229 | 212 | ('public/**', 'ignore', None), |
|
230 | 213 | ] |
|
231 | 214 | }, |
|
232 | zip_safe=False, | |
|
233 | 215 | paster_plugins=['PasteScript', 'Pylons'], |
|
234 | 216 | entry_points={ |
|
235 | 217 | 'enterprise.plugins1': [ |
@@ -249,7 +231,15 b' setup(' | |||
|
249 | 231 | 'main=pylons.util:PylonsInstaller', |
|
250 | 232 | 'pylons=pylons.util:PylonsInstaller', |
|
251 | 233 | ], |
|
252 |
'paste.global_paster_command': |
|
|
234 | 'paste.global_paster_command': [ | |
|
235 | 'make-config=rhodecode.lib.paster_commands.make_config:Command', | |
|
236 | 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command', | |
|
237 | 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command', | |
|
238 | 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command', | |
|
239 | 'ishell=rhodecode.lib.paster_commands.ishell:Command', | |
|
240 | 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb', | |
|
241 | 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand', | |
|
242 | ], | |
|
253 | 243 | 'pytest11': [ |
|
254 | 244 | 'pylons=rhodecode.tests.pylons_plugin', |
|
255 | 245 | 'enterprise=rhodecode.tests.plugin', |
General Comments 0
You need to be logged in to leave comments.
Login now