##// END OF EJS Templates
Fix check statements from () which had no effect really
marcink -
r3892:3a1cf70e beta
parent child Browse files
Show More
@@ -1,62 +1,62 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, 7, 0, 'dev')
30 30 BACKENDS = {
31 31 'hg': 'Mercurial repository',
32 32 'git': 'Git repository',
33 33 }
34 34
35 35 CELERY_ON = False
36 36 CELERY_EAGER = False
37 37
38 38 # link to config for pylons
39 39 CONFIG = {}
40 40
41 41 # Linked module for extensions
42 42 EXTENSIONS = {}
43 43
44 44 try:
45 45 from rhodecode.lib import get_current_revision
46 46 _rev = get_current_revision()
47 47 if _rev and len(VERSION) > 3:
48 48 VERSION += ('%s' % _rev[0],)
49 49 except ImportError:
50 50 pass
51 51
52 52 __version__ = ('.'.join((str(each) for each in VERSION[:3])) +
53 53 '.'.join(VERSION[3:]))
54 54 __dbversion__ = 12 # defines current db version for migrations
55 55 __platform__ = platform.system()
56 56 __license__ = 'GPLv3'
57 57 __py_version__ = sys.version_info
58 58 __author__ = 'Marcin Kuzminski'
59 59 __url__ = 'http://rhodecode.org'
60 60
61 is_windows = __platform__ in ('Windows')
61 is_windows = __platform__ in ['Windows']
62 62 is_unix = not is_windows
@@ -1,174 +1,174 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 is_windows = __platform__ in ('Windows')
33 is_windows = __platform__ in ['Windows']
34 34
35 35 requirements = [
36 36 "waitress==0.8.2",
37 37 "webob==1.0.8",
38 38 "webtest==1.4.3",
39 39 "Pylons==1.0.0",
40 40 "Beaker==1.6.4",
41 41 "WebHelpers==1.3",
42 42 "formencode==1.2.4",
43 43 "SQLAlchemy==0.7.10",
44 44 "Mako==0.7.3",
45 45 "pygments>=1.5",
46 46 "whoosh>=2.4.0,<2.5",
47 47 "celery>=2.2.5,<2.3",
48 48 "babel",
49 49 "python-dateutil>=1.5.0,<2.0.0",
50 50 "dulwich>=0.8.7,<0.9.0",
51 51 "markdown==2.2.1",
52 52 "docutils==0.8.1",
53 53 "simplejson==2.5.2",
54 54 "mock",
55 55 ]
56 56
57 57 if sys.version_info < (2, 6):
58 58 requirements.append("pysqlite")
59 59
60 60 if sys.version_info < (2, 7):
61 61 requirements.append("unittest2")
62 62 requirements.append("argparse")
63 63
64 64 if is_windows:
65 65 requirements.append("mercurial==2.6.0")
66 66 else:
67 67 requirements.append("py-bcrypt")
68 68 requirements.append("mercurial==2.6.0")
69 69
70 70
71 71 dependency_links = [
72 72 ]
73 73
74 74 classifiers = [
75 75 'Development Status :: 4 - Beta',
76 76 'Environment :: Web Environment',
77 77 'Framework :: Pylons',
78 78 'Intended Audience :: Developers',
79 79 'License :: OSI Approved :: GNU General Public License (GPL)',
80 80 'Operating System :: OS Independent',
81 81 'Programming Language :: Python',
82 82 'Programming Language :: Python :: 2.5',
83 83 'Programming Language :: Python :: 2.6',
84 84 'Programming Language :: Python :: 2.7',
85 85 ]
86 86
87 87
88 88 # additional files from project that goes somewhere in the filesystem
89 89 # relative to sys.prefix
90 90 data_files = []
91 91
92 92 # additional files that goes into package itself
93 93 package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
94 94
95 95 description = ('RhodeCode is a fast and powerful management tool '
96 96 'for Mercurial and GIT with a built in push/pull server, '
97 97 'full text search and code-review.')
98 98 keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git',
99 99 'code review', 'repo groups', 'ldap'
100 100 'repository management', 'hgweb replacement'
101 101 'hgwebdir', 'gitweb replacement', 'serving hgweb', ])
102 102 # long description
103 103 try:
104 104 readme_file = 'README.rst'
105 105 changelog_file = 'docs/changelog.rst'
106 106 long_description = open(readme_file).read() + '\n\n' + \
107 107 open(changelog_file).read()
108 108
109 109 except IOError, err:
110 110 sys.stderr.write("[WARNING] Cannot find file specified as "
111 111 "long_description (%s)\n or changelog (%s) skipping that file" \
112 112 % (readme_file, changelog_file))
113 113 long_description = description
114 114
115 115
116 116 try:
117 117 from setuptools import setup, find_packages
118 118 except ImportError:
119 119 from ez_setup import use_setuptools
120 120 use_setuptools()
121 121 from setuptools import setup, find_packages
122 122 # packages
123 123 packages = find_packages(exclude=['ez_setup'])
124 124
125 125 setup(
126 126 name='RhodeCode',
127 127 version=__version__,
128 128 description=description,
129 129 long_description=long_description,
130 130 keywords=keywords,
131 131 license=__license__,
132 132 author=__author__,
133 133 author_email='marcin@python-works.com',
134 134 dependency_links=dependency_links,
135 135 url=__url__,
136 136 install_requires=requirements,
137 137 classifiers=classifiers,
138 138 setup_requires=["PasteScript>=1.6.3"],
139 139 data_files=data_files,
140 140 packages=packages,
141 141 include_package_data=True,
142 142 test_suite='nose.collector',
143 143 package_data=package_data,
144 144 message_extractors={'rhodecode': [
145 145 ('**.py', 'python', None),
146 146 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
147 147 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
148 148 ('public/**', 'ignore', None)]},
149 149 zip_safe=False,
150 150 paster_plugins=['PasteScript', 'Pylons'],
151 151 entry_points="""
152 152 [console_scripts]
153 153 rhodecode-api = rhodecode.bin.rhodecode_api:main
154 154 rhodecode-gist = rhodecode.bin.rhodecode_gist:main
155 155
156 156 [paste.app_factory]
157 157 main = rhodecode.config.middleware:make_app
158 158
159 159 [paste.app_install]
160 160 main = pylons.util:PylonsInstaller
161 161
162 162 [paste.global_paster_command]
163 163 setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command
164 164 cleanup-repos=rhodecode.lib.paster_commands.cleanup:Command
165 165 update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command
166 166 make-rcext=rhodecode.lib.paster_commands.make_rcextensions:Command
167 167 repo-scan=rhodecode.lib.paster_commands.repo_scan:Command
168 168 cache-keys=rhodecode.lib.paster_commands.cache_keys:Command
169 169 ishell=rhodecode.lib.paster_commands.ishell:Command
170 170 make-index=rhodecode.lib.indexers:MakeIndex
171 171 upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb
172 172 celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand
173 173 """,
174 174 )
General Comments 0
You need to be logged in to leave comments. Login now