Show More
@@ -1,75 +1,86 | |||
|
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://semver.org/ |
|
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 | import sys | |
|
26 | 27 | import platform |
|
27 | 28 | |
|
28 | 29 | VERSION = (1, 2, 5) |
|
29 | 30 | __version__ = '.'.join((str(each) for each in VERSION[:4])) |
|
30 | 31 | __dbversion__ = 3 # defines current db version for migrations |
|
31 | 32 | __platform__ = platform.system() |
|
32 | 33 | __license__ = 'GPLv3' |
|
34 | __py_version__ = sys.version_info | |
|
33 | 35 | |
|
34 | 36 | PLATFORM_WIN = ('Windows') |
|
35 | 37 | PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS') |
|
36 | 38 | |
|
37 | 39 | requirements = [ |
|
38 | 40 | "Pylons==1.0.0", |
|
39 | 41 | "Beaker==1.5.4", |
|
40 | 42 | "WebHelpers>=1.2", |
|
41 | 43 | "formencode==1.2.4", |
|
42 | 44 | "SQLAlchemy==0.7.4", |
|
43 | 45 | "Mako==0.5.0", |
|
44 | 46 | "pygments>=1.4", |
|
45 | "mercurial>=2.0,<2.1", | |
|
46 | 47 | "whoosh<1.8", |
|
47 | 48 | "celery>=2.2.5,<2.3", |
|
48 | 49 | "babel", |
|
49 | 50 | "python-dateutil>=1.5.0,<2.0.0", |
|
50 | 51 | "dulwich>=0.8.0,<0.9.0", |
|
51 | 52 | "vcs==0.2.2", |
|
52 | 53 | "webob==1.0.8" |
|
53 | 54 | ] |
|
54 | 55 | |
|
56 | if __py_version__ < (2, 6): | |
|
57 | requirements.append("simplejson") | |
|
58 | requirements.append("pysqlite") | |
|
59 | ||
|
60 | if __platform__ in PLATFORM_WIN: | |
|
61 | requirements.append("mercurial==2.0.1") | |
|
62 | else: | |
|
63 | requirements.append("py-bcrypt") | |
|
64 | requirements.append("mercurial==2.0.2") | |
|
65 | ||
|
55 | 66 | |
|
56 | 67 | try: |
|
57 | 68 | from rhodecode.lib import get_current_revision |
|
58 | 69 | _rev = get_current_revision(quiet=True) |
|
59 | 70 | except ImportError: |
|
60 | 71 | # this is needed when doing some setup.py operations |
|
61 | 72 | _rev = False |
|
62 | 73 | |
|
63 | 74 | if len(VERSION) > 3 and _rev: |
|
64 | 75 | __version__ += ' [rev:%s]' % _rev[0] |
|
65 | 76 | |
|
66 | 77 | |
|
67 | 78 | def get_version(): |
|
68 | 79 | """Returns shorter version (digit parts only) as string.""" |
|
69 | 80 | |
|
70 | 81 | return '.'.join((str(each) for each in VERSION[:3])) |
|
71 | 82 | |
|
72 | 83 | BACKENDS = { |
|
73 | 84 | 'hg': 'Mercurial repository', |
|
74 | 85 | #'git': 'Git repository', |
|
75 | 86 | } |
@@ -1,110 +1,100 | |||
|
1 | 1 | import sys |
|
2 | 2 | from rhodecode import get_version |
|
3 | from rhodecode import __platform__ | |
|
4 | 3 | from rhodecode import __license__ |
|
5 |
from rhodecode import |
|
|
4 | from rhodecode import __py_version__ | |
|
6 | 5 | from rhodecode import requirements |
|
7 | 6 | |
|
8 | py_version = sys.version_info | |
|
9 | ||
|
10 | if py_version < (2, 5): | |
|
7 | if __py_version__ < (2, 5): | |
|
11 | 8 | raise Exception('RhodeCode requires python 2.5 or later') |
|
12 | 9 | |
|
13 | 10 | |
|
14 | 11 | dependency_links = [ |
|
15 | 12 | ] |
|
16 | 13 | |
|
17 | 14 | classifiers = ['Development Status :: 5 - Production/Stable', |
|
18 | 15 | 'Environment :: Web Environment', |
|
19 | 16 | 'Framework :: Pylons', |
|
20 | 17 | 'Intended Audience :: Developers', |
|
21 | 18 | 'License :: OSI Approved :: GNU General Public License (GPL)', |
|
22 | 19 | 'Operating System :: OS Independent', |
|
23 | 20 | 'Programming Language :: Python', |
|
24 | 21 | 'Programming Language :: Python :: 2.5', |
|
25 | 22 | 'Programming Language :: Python :: 2.6', |
|
26 | 23 | 'Programming Language :: Python :: 2.7', ] |
|
27 | 24 | |
|
28 | if py_version < (2, 6): | |
|
29 | requirements.append("simplejson") | |
|
30 | requirements.append("pysqlite") | |
|
31 | ||
|
32 | if __platform__ in PLATFORM_OTHERS: | |
|
33 | requirements.append("py-bcrypt") | |
|
34 | ||
|
35 | 25 | |
|
36 | 26 | # additional files from project that goes somewhere in the filesystem |
|
37 | 27 | # relative to sys.prefix |
|
38 | 28 | data_files = [] |
|
39 | 29 | |
|
40 | 30 | # additional files that goes into package itself |
|
41 | 31 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } |
|
42 | 32 | |
|
43 | 33 | description = ('Mercurial repository browser/management with ' |
|
44 | 34 | 'build in push/pull server and full text search') |
|
45 | 35 | keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git', |
|
46 | 36 | 'code review', 'repo groups', 'ldap' |
|
47 | 37 | 'repository management', 'hgweb replacement' |
|
48 | 38 | 'hgwebdir', 'gitweb replacement', 'serving hgweb', ]) |
|
49 | 39 | # long description |
|
50 | 40 | try: |
|
51 | 41 | readme_file = 'README.rst' |
|
52 | 42 | changelog_file = 'docs/changelog.rst' |
|
53 | 43 | long_description = open(readme_file).read() + '\n\n' + \ |
|
54 | 44 | open(changelog_file).read() |
|
55 | 45 | |
|
56 | 46 | except IOError, err: |
|
57 | 47 | sys.stderr.write("[WARNING] Cannot find file specified as " |
|
58 | 48 | "long_description (%s)\n or changelog (%s) skipping that file" \ |
|
59 | 49 | % (readme_file, changelog_file)) |
|
60 | 50 | long_description = description |
|
61 | 51 | |
|
62 | 52 | |
|
63 | 53 | try: |
|
64 | 54 | from setuptools import setup, find_packages |
|
65 | 55 | except ImportError: |
|
66 | 56 | from ez_setup import use_setuptools |
|
67 | 57 | use_setuptools() |
|
68 | 58 | from setuptools import setup, find_packages |
|
69 | 59 | # packages |
|
70 | 60 | packages = find_packages(exclude=['ez_setup']) |
|
71 | 61 | |
|
72 | 62 | setup( |
|
73 | 63 | name='RhodeCode', |
|
74 | 64 | version=get_version(), |
|
75 | 65 | description=description, |
|
76 | 66 | long_description=long_description, |
|
77 | 67 | keywords=keywords, |
|
78 | 68 | license=__license__, |
|
79 | 69 | author='Marcin Kuzminski', |
|
80 | 70 | author_email='marcin@python-works.com', |
|
81 | 71 | dependency_links=dependency_links, |
|
82 | 72 | url='http://rhodecode.org', |
|
83 | 73 | install_requires=requirements, |
|
84 | 74 | classifiers=classifiers, |
|
85 | 75 | setup_requires=["PasteScript>=1.6.3"], |
|
86 | 76 | data_files=data_files, |
|
87 | 77 | packages=packages, |
|
88 | 78 | include_package_data=True, |
|
89 | 79 | test_suite='nose.collector', |
|
90 | 80 | package_data=package_data, |
|
91 | 81 | message_extractors={'rhodecode': [ |
|
92 | 82 | ('**.py', 'python', None), |
|
93 | 83 | ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), |
|
94 | 84 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), |
|
95 | 85 | ('public/**', 'ignore', None)]}, |
|
96 | 86 | zip_safe=False, |
|
97 | 87 | paster_plugins=['PasteScript', 'Pylons'], |
|
98 | 88 | entry_points=""" |
|
99 | 89 | [paste.app_factory] |
|
100 | 90 | main = rhodecode.config.middleware:make_app |
|
101 | 91 | |
|
102 | 92 | [paste.app_install] |
|
103 | 93 | main = pylons.util:PylonsInstaller |
|
104 | 94 | |
|
105 | 95 | [paste.global_paster_command] |
|
106 | 96 | make-index = rhodecode.lib.indexers:MakeIndex |
|
107 | 97 | upgrade-db = rhodecode.lib.dbmigrate:UpgradeDb |
|
108 | 98 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand |
|
109 | 99 | """, |
|
110 | 100 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now