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