Show More
@@ -1,170 +1,170 b'' | |||
|
1 | 1 | import os |
|
2 | 2 | import sys |
|
3 | 3 | import platform |
|
4 | 4 | |
|
5 | 5 | if sys.version_info < (2, 5): |
|
6 | 6 | raise Exception('RhodeCode requires python 2.5 or later') |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | here = os.path.abspath(os.path.dirname(__file__)) |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | def _get_meta_var(name, data, callback_handler=None): |
|
13 | 13 | import re |
|
14 | 14 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) |
|
15 | 15 | if matches: |
|
16 | 16 | if not callable(callback_handler): |
|
17 | 17 | callback_handler = lambda v: v |
|
18 | 18 | |
|
19 | 19 | return callback_handler(eval(matches.groups()[0])) |
|
20 | 20 | |
|
21 | 21 | _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') |
|
22 | 22 | _metadata = _meta.read() |
|
23 | 23 | _meta.close() |
|
24 | 24 | |
|
25 | 25 | callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) |
|
26 | 26 | __version__ = _get_meta_var('VERSION', _metadata, callback) |
|
27 | 27 | __license__ = _get_meta_var('__license__', _metadata) |
|
28 | 28 | __author__ = _get_meta_var('__author__', _metadata) |
|
29 | 29 | __url__ = _get_meta_var('__url__', _metadata) |
|
30 | 30 | # defines current platform |
|
31 | 31 | __platform__ = platform.system() |
|
32 | 32 | |
|
33 | 33 | is_windows = __platform__ in _get_meta_var('PLATFORM_WIN', _metadata) |
|
34 | 34 | |
|
35 | 35 | requirements = [ |
|
36 | 36 | "waitress==0.8.2", |
|
37 | 37 | "webob==1.0.8", |
|
38 | 38 | "Pylons==1.0.0", |
|
39 | 39 | "Beaker==1.6.4", |
|
40 | 40 | "WebHelpers==1.3", |
|
41 | 41 | "formencode==1.2.4", |
|
42 | 42 | "SQLAlchemy==0.7.9", |
|
43 | 43 | "Mako==0.7.3", |
|
44 | 44 | "pygments>=1.5", |
|
45 | 45 | "whoosh>=2.4.0,<2.5", |
|
46 | 46 | "celery>=2.2.5,<2.3", |
|
47 | 47 | "babel", |
|
48 | 48 | "python-dateutil>=1.5.0,<2.0.0", |
|
49 | 49 | "dulwich>=0.8.7,<0.9.0", |
|
50 | 50 | "markdown==2.2.1", |
|
51 | 51 | "docutils==0.8.1", |
|
52 | 52 | "simplejson==2.5.2", |
|
53 | 53 | "mock", |
|
54 | 54 | ] |
|
55 | 55 | |
|
56 | 56 | if sys.version_info < (2, 6): |
|
57 | 57 | requirements.append("pysqlite") |
|
58 | 58 | |
|
59 | 59 | if sys.version_info < (2, 7): |
|
60 | 60 | requirements.append("unittest2") |
|
61 | 61 | requirements.append("argparse") |
|
62 | 62 | |
|
63 | 63 | if is_windows: |
|
64 |
requirements.append("mercurial==2. |
|
|
64 | requirements.append("mercurial==2.5.1") | |
|
65 | 65 | else: |
|
66 | 66 | requirements.append("py-bcrypt") |
|
67 |
requirements.append("mercurial==2. |
|
|
67 | requirements.append("mercurial==2.5.1") | |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | dependency_links = [ |
|
71 | 71 | ] |
|
72 | 72 | |
|
73 | 73 | classifiers = [ |
|
74 | 74 | 'Development Status :: 4 - Beta', |
|
75 | 75 | 'Environment :: Web Environment', |
|
76 | 76 | 'Framework :: Pylons', |
|
77 | 77 | 'Intended Audience :: Developers', |
|
78 | 78 | 'License :: OSI Approved :: GNU General Public License (GPL)', |
|
79 | 79 | 'Operating System :: OS Independent', |
|
80 | 80 | 'Programming Language :: Python', |
|
81 | 81 | 'Programming Language :: Python :: 2.5', |
|
82 | 82 | 'Programming Language :: Python :: 2.6', |
|
83 | 83 | 'Programming Language :: Python :: 2.7', |
|
84 | 84 | ] |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | # additional files from project that goes somewhere in the filesystem |
|
88 | 88 | # relative to sys.prefix |
|
89 | 89 | data_files = [] |
|
90 | 90 | |
|
91 | 91 | # additional files that goes into package itself |
|
92 | 92 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
93 | 93 | |
|
94 | 94 | description = ('RhodeCode is a fast and powerful management tool ' |
|
95 | 95 | 'for Mercurial and GIT with a built in push/pull server, ' |
|
96 | 96 | 'full text search and code-review.') |
|
97 | 97 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', |
|
98 | 98 | 'code review', 'repo groups', 'ldap' |
|
99 | 99 | 'repository management', 'hgweb replacement' |
|
100 | 100 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) |
|
101 | 101 | # long description |
|
102 | 102 | try: |
|
103 | 103 | readme_file = 'README.rst' |
|
104 | 104 | changelog_file = 'docs/changelog.rst' |
|
105 | 105 | long_description = open(readme_file).read() + '\n\n' + \ |
|
106 | 106 | open(changelog_file).read() |
|
107 | 107 | |
|
108 | 108 | except IOError, err: |
|
109 | 109 | sys.stderr.write("[WARNING] Cannot find file specified as " |
|
110 | 110 | "long_description (%s)\n or changelog (%s) skipping that file" \ |
|
111 | 111 | % (readme_file, changelog_file)) |
|
112 | 112 | long_description = description |
|
113 | 113 | |
|
114 | 114 | |
|
115 | 115 | try: |
|
116 | 116 | from setuptools import setup, find_packages |
|
117 | 117 | except ImportError: |
|
118 | 118 | from ez_setup import use_setuptools |
|
119 | 119 | use_setuptools() |
|
120 | 120 | from setuptools import setup, find_packages |
|
121 | 121 | # packages |
|
122 | 122 | packages = find_packages(exclude=['ez_setup']) |
|
123 | 123 | |
|
124 | 124 | setup( |
|
125 | 125 | name='RhodeCode', |
|
126 | 126 | version=__version__, |
|
127 | 127 | description=description, |
|
128 | 128 | long_description=long_description, |
|
129 | 129 | keywords=keywords, |
|
130 | 130 | license=__license__, |
|
131 | 131 | author=__author__, |
|
132 | 132 | author_email='marcin@python-works.com', |
|
133 | 133 | dependency_links=dependency_links, |
|
134 | 134 | url=__url__, |
|
135 | 135 | install_requires=requirements, |
|
136 | 136 | classifiers=classifiers, |
|
137 | 137 | setup_requires=["PasteScript>=1.6.3"], |
|
138 | 138 | data_files=data_files, |
|
139 | 139 | packages=packages, |
|
140 | 140 | include_package_data=True, |
|
141 | 141 | test_suite='nose.collector', |
|
142 | 142 | package_data=package_data, |
|
143 | 143 | message_extractors={'rhodecode': [ |
|
144 | 144 | ('**.py', 'python', None), |
|
145 | 145 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
146 | 146 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
147 | 147 | ('public/**', 'ignore', None)]}, |
|
148 | 148 | zip_safe=False, |
|
149 | 149 | paster_plugins=['PasteScript', 'Pylons'], |
|
150 | 150 | entry_points=""" |
|
151 | 151 | [console_scripts] |
|
152 | 152 | rhodecode-api = rhodecode.bin.rhodecode_api:main |
|
153 | 153 | |
|
154 | 154 | [paste.app_factory] |
|
155 | 155 | main = rhodecode.config.middleware:make_app |
|
156 | 156 | |
|
157 | 157 | [paste.app_install] |
|
158 | 158 | main = pylons.util:PylonsInstaller |
|
159 | 159 | |
|
160 | 160 | [paste.global_paster_command] |
|
161 | 161 | setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command |
|
162 | 162 | cleanup-repos=rhodecode.lib.paster_commands.cleanup:Command |
|
163 | 163 | update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command |
|
164 | 164 | make-rcext=rhodecode.lib.paster_commands.make_rcextensions:Command |
|
165 | 165 | repo-scan=rhodecode.lib.paster_commands.repo_scan:Command |
|
166 | 166 | make-index=rhodecode.lib.indexers:MakeIndex |
|
167 | 167 | upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb |
|
168 | 168 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand |
|
169 | 169 | """, |
|
170 | 170 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now