Show More
@@ -1,98 +1,67 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """ |
|
3 | 3 | rhodecode.__init__ |
|
4 | 4 | ~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 | 6 | RhodeCode, a web based repository management based on pylons |
|
7 | 7 | versioning implementation: http://www.python.org/dev/peps/pep-0386/ |
|
8 | 8 | |
|
9 | 9 | :created_on: Apr 9, 2010 |
|
10 | 10 | :author: marcink |
|
11 | 11 | :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> |
|
12 | 12 | :license: GPLv3, see COPYING for more details. |
|
13 | 13 | """ |
|
14 | 14 | # This program is free software: you can redistribute it and/or modify |
|
15 | 15 | # it under the terms of the GNU General Public License as published by |
|
16 | 16 | # the Free Software Foundation, either version 3 of the License, or |
|
17 | 17 | # (at your option) any later version. |
|
18 | 18 | # |
|
19 | 19 | # This program is distributed in the hope that it will be useful, |
|
20 | 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 | 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 | 22 | # GNU General Public License for more details. |
|
23 | 23 | # |
|
24 | 24 | # You should have received a copy of the GNU General Public License |
|
25 | 25 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
26 | 26 | import sys |
|
27 | 27 | import platform |
|
28 | 28 | |
|
29 | 29 | VERSION = (1, 4, 0, 'b') |
|
30 | 30 | |
|
31 | 31 | try: |
|
32 | 32 | from rhodecode.lib import get_current_revision |
|
33 | 33 | _rev = get_current_revision() |
|
34 | 34 | if _rev and len(VERSION) > 3: |
|
35 | 35 | VERSION += ('dev%s' % _rev[0],) |
|
36 | 36 | except ImportError: |
|
37 | 37 | pass |
|
38 | 38 | |
|
39 | 39 | __version__ = ('.'.join((str(each) for each in VERSION[:3])) + |
|
40 | 40 | '.'.join(VERSION[3:])) |
|
41 | 41 | __dbversion__ = 6 # defines current db version for migrations |
|
42 | 42 | __platform__ = platform.system() |
|
43 | 43 | __license__ = 'GPLv3' |
|
44 | 44 | __py_version__ = sys.version_info |
|
45 | __author__ = 'Marcin Kuzminski' | |
|
46 | __url__ = 'http://rhodecode.org' | |
|
45 | 47 | |
|
46 | 48 | PLATFORM_WIN = ('Windows') |
|
47 | 49 | PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS') |
|
48 | 50 | |
|
49 | 51 | is_windows = __platform__ in PLATFORM_WIN |
|
50 | 52 | is_unix = __platform__ in PLATFORM_OTHERS |
|
51 | 53 | |
|
52 | requirements = [ | |
|
53 | "Pylons==1.0.0", | |
|
54 | "Beaker==1.6.3", | |
|
55 | "WebHelpers==1.3", | |
|
56 | "formencode==1.2.4", | |
|
57 | "SQLAlchemy==0.7.8", | |
|
58 | "Mako==0.7.0", | |
|
59 | "pygments>=1.4", | |
|
60 | "whoosh>=2.4.0,<2.5", | |
|
61 | "celery>=2.2.5,<2.3", | |
|
62 | "babel", | |
|
63 | "python-dateutil>=1.5.0,<2.0.0", | |
|
64 | "dulwich>=0.8.5,<0.9.0", | |
|
65 | "webob==1.0.8", | |
|
66 | "markdown==2.1.1", | |
|
67 | "docutils==0.8.1", | |
|
68 | "simplejson==2.5.2", | |
|
69 | ] | |
|
70 | ||
|
71 | if __py_version__ < (2, 6): | |
|
72 | requirements.append("pysqlite") | |
|
73 | ||
|
74 | if is_windows: | |
|
75 | requirements.append("mercurial>=2.2.2,<2.3") | |
|
76 | else: | |
|
77 | requirements.append("py-bcrypt") | |
|
78 | requirements.append("mercurial>=2.2.2,<2.3") | |
|
79 | ||
|
80 | ||
|
81 | def get_version(): | |
|
82 | """Returns shorter version (digit parts only) as string.""" | |
|
83 | ||
|
84 | return '.'.join((str(each) for each in VERSION[:3])) | |
|
85 | 54 | |
|
86 | 55 | BACKENDS = { |
|
87 | 56 | 'hg': 'Mercurial repository', |
|
88 | 57 | 'git': 'Git repository', |
|
89 | 58 | } |
|
90 | 59 | |
|
91 | 60 | CELERY_ON = False |
|
92 | 61 | CELERY_EAGER = False |
|
93 | 62 | |
|
94 | 63 | # link to config for pylons |
|
95 | 64 | CONFIG = {} |
|
96 | 65 | |
|
97 | 66 | # Linked module for extensions |
|
98 | 67 | EXTENSIONS = {} |
@@ -1,106 +1,164 b'' | |||
|
1 | import os | |
|
1 | 2 | import sys |
|
2 | from rhodecode import get_version | |
|
3 | from rhodecode import __license__ | |
|
4 | from rhodecode import __py_version__ | |
|
5 | from rhodecode import requirements | |
|
3 | import platform | |
|
4 | ||
|
5 | if sys.version_info < (2, 5): | |
|
6 | raise Exception('RhodeCode requires python 2.5 or later') | |
|
7 | ||
|
8 | ||
|
9 | here = os.path.abspath(os.path.dirname(__file__)) | |
|
10 | ||
|
11 | ||
|
12 | def _get_meta_var(name, data, callback_handler=None): | |
|
13 | import re | |
|
14 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) | |
|
15 | if matches: | |
|
16 | if not callable(callback_handler): | |
|
17 | callback_handler = lambda v: v | |
|
18 | ||
|
19 | return callback_handler(eval(matches.groups()[0])) | |
|
20 | ||
|
21 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') | |
|
22 | _metadata = _meta.read() | |
|
23 | _meta.close() | |
|
24 | ||
|
25 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) | |
|
26 | __version__ = _get_meta_var('VERSION', _metadata, callback) | |
|
27 | __license__ = _get_meta_var('__license__', _metadata) | |
|
28 | __author__ = _get_meta_var('__author__', _metadata) | |
|
29 | __url__ = _get_meta_var('__url__', _metadata) | |
|
30 | # defines current platform | |
|
31 | __platform__ = platform.system() | |
|
32 | ||
|
33 | is_windows = __platform__ in _get_meta_var('PLATFORM_WIN', _metadata) | |
|
6 | 34 | |
|
7 | if __py_version__ < (2, 5): | |
|
8 | raise Exception('RhodeCode requires python 2.5 or later') | |
|
35 | requirements = [ | |
|
36 | "Pylons==1.0.0", | |
|
37 | "Beaker==1.6.3", | |
|
38 | "WebHelpers==1.3", | |
|
39 | "formencode==1.2.4", | |
|
40 | "SQLAlchemy==0.7.8", | |
|
41 | "Mako==0.7.0", | |
|
42 | "pygments>=1.4", | |
|
43 | "whoosh>=2.4.0,<2.5", | |
|
44 | "celery>=2.2.5,<2.3", | |
|
45 | "babel", | |
|
46 | "python-dateutil>=1.5.0,<2.0.0", | |
|
47 | "dulwich>=0.8.5,<0.9.0", | |
|
48 | "webob==1.0.8", | |
|
49 | "markdown==2.1.1", | |
|
50 | "docutils==0.8.1", | |
|
51 | "simplejson==2.5.2", | |
|
52 | "mock" | |
|
53 | ] | |
|
54 | ||
|
55 | if sys.version_info < (2, 6): | |
|
56 | requirements.append("pysqlite") | |
|
57 | ||
|
58 | if sys.version_info <= (2, 6): | |
|
59 | requirements.append("unittest2") | |
|
60 | ||
|
61 | if is_windows: | |
|
62 | requirements.append("mercurial>=2.2.3,<2.3") | |
|
63 | else: | |
|
64 | requirements.append("py-bcrypt") | |
|
65 | requirements.append("mercurial>=2.2.3,<2.3") | |
|
66 | ||
|
9 | 67 | |
|
10 | 68 | dependency_links = [ |
|
11 | 69 | ] |
|
12 | 70 | |
|
13 | 71 | classifiers = [ |
|
14 | 72 | 'Development Status :: 4 - Beta', |
|
15 | 73 | 'Environment :: Web Environment', |
|
16 | 74 | 'Framework :: Pylons', |
|
17 | 75 | 'Intended Audience :: Developers', |
|
18 | 76 | 'License :: OSI Approved :: GNU General Public License (GPL)', |
|
19 | 77 | 'Operating System :: OS Independent', |
|
20 | 78 | 'Programming Language :: Python', |
|
21 | 79 | 'Programming Language :: Python :: 2.5', |
|
22 | 80 | 'Programming Language :: Python :: 2.6', |
|
23 | 81 | 'Programming Language :: Python :: 2.7', |
|
24 | 82 | ] |
|
25 | 83 | |
|
26 | 84 | |
|
27 | 85 | # additional files from project that goes somewhere in the filesystem |
|
28 | 86 | # relative to sys.prefix |
|
29 | 87 | data_files = [] |
|
30 | 88 | |
|
31 | 89 | # additional files that goes into package itself |
|
32 | 90 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
33 | 91 | |
|
34 | 92 | description = ('Mercurial repository browser/management with ' |
|
35 | 93 | 'build in push/pull server and full text search') |
|
36 | 94 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', |
|
37 | 95 | 'code review', 'repo groups', 'ldap' |
|
38 | 96 | 'repository management', 'hgweb replacement' |
|
39 | 97 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) |
|
40 | 98 | # long description |
|
41 | 99 | try: |
|
42 | 100 | readme_file = 'README.rst' |
|
43 | 101 | changelog_file = 'docs/changelog.rst' |
|
44 | 102 | long_description = open(readme_file).read() + '\n\n' + \ |
|
45 | 103 | open(changelog_file).read() |
|
46 | 104 | |
|
47 | 105 | except IOError, err: |
|
48 | 106 | sys.stderr.write("[WARNING] Cannot find file specified as " |
|
49 | 107 | "long_description (%s)\n or changelog (%s) skipping that file" \ |
|
50 | 108 | % (readme_file, changelog_file)) |
|
51 | 109 | long_description = description |
|
52 | 110 | |
|
53 | 111 | |
|
54 | 112 | try: |
|
55 | 113 | from setuptools import setup, find_packages |
|
56 | 114 | except ImportError: |
|
57 | 115 | from ez_setup import use_setuptools |
|
58 | 116 | use_setuptools() |
|
59 | 117 | from setuptools import setup, find_packages |
|
60 | 118 | # packages |
|
61 | 119 | packages = find_packages(exclude=['ez_setup']) |
|
62 | 120 | |
|
63 | 121 | setup( |
|
64 | 122 | name='RhodeCode', |
|
65 |
version= |
|
|
123 | version=__version__, | |
|
66 | 124 | description=description, |
|
67 | 125 | long_description=long_description, |
|
68 | 126 | keywords=keywords, |
|
69 | 127 | license=__license__, |
|
70 | author='Marcin Kuzminski', | |
|
128 | author=__author__, | |
|
71 | 129 | author_email='marcin@python-works.com', |
|
72 | 130 | dependency_links=dependency_links, |
|
73 | url='http://rhodecode.org', | |
|
131 | url=__url__, | |
|
74 | 132 | install_requires=requirements, |
|
75 | 133 | classifiers=classifiers, |
|
76 | 134 | setup_requires=["PasteScript>=1.6.3"], |
|
77 | 135 | data_files=data_files, |
|
78 | 136 | packages=packages, |
|
79 | 137 | include_package_data=True, |
|
80 | 138 | test_suite='nose.collector', |
|
81 | 139 | package_data=package_data, |
|
82 | 140 | message_extractors={'rhodecode': [ |
|
83 | 141 | ('**.py', 'python', None), |
|
84 | 142 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
85 | 143 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
86 | 144 | ('public/**', 'ignore', None)]}, |
|
87 | 145 | zip_safe=False, |
|
88 | 146 | paster_plugins=['PasteScript', 'Pylons'], |
|
89 | 147 | entry_points=""" |
|
90 | 148 | [console_scripts] |
|
91 | 149 | rhodecode-api = rhodecode.bin.rhodecode_api:main |
|
92 | 150 | |
|
93 | 151 | [paste.app_factory] |
|
94 | 152 | main = rhodecode.config.middleware:make_app |
|
95 | 153 | |
|
96 | 154 | [paste.app_install] |
|
97 | 155 | main = pylons.util:PylonsInstaller |
|
98 | 156 | |
|
99 | 157 | [paste.global_paster_command] |
|
100 | 158 | setup-rhodecode=rhodecode.config.setup_rhodecode:SetupCommand |
|
101 | 159 | make-index=rhodecode.lib.indexers:MakeIndex |
|
102 | 160 | make-rcext=rhodecode.config.rcextensions.make_rcextensions:MakeRcExt |
|
103 | 161 | upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb |
|
104 | 162 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand |
|
105 | 163 | """, |
|
106 | 164 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now