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