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