Show More
@@ -42,6 +42,8 b' except ImportError:' | |||
|
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') |
@@ -49,39 +51,6 b" PLATFORM_OTHERS = ('Linux', 'Darwin', 'F" | |||
|
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', |
@@ -1,11 +1,69 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 | ] |
@@ -62,15 +120,15 b" packages = find_packages(exclude=['ez_se" | |||
|
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"], |
General Comments 0
You need to be logged in to leave comments.
Login now