Mercurial > kallithea
annotate rhodecode/__init__.py @ 1964:b1ad9efeec14 beta
fixed requires files, added distinction on win vs other platforms
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 28 Jan 2012 18:07:20 +0200 |
parents | bdf16af5472a |
children | edd3f202da4e |
rev | line source |
---|---|
807
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
1 # -*- coding: utf-8 -*- |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
2 """ |
827
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
3 rhodecode.__init__ |
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
4 ~~~~~~~~~~~~~~~~~~ |
807
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
5 |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
6 RhodeCode, a web based repository management based on pylons |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
7 versioning implementation: http://semver.org/ |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
8 |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
9 :created_on: Apr 9, 2010 |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
10 :author: marcink |
1824
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1822
diff
changeset
|
11 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> |
807
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
12 :license: GPLv3, see COPYING for more details. |
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
13 """ |
1206
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
14 # This program is free software: you can redistribute it and/or modify |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
15 # it under the terms of the GNU General Public License as published by |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
16 # the Free Software Foundation, either version 3 of the License, or |
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
17 # (at your option) any later version. |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1194
diff
changeset
|
18 # |
252
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
19 # This program is distributed in the hope that it will be useful, |
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
22 # GNU General Public License for more details. |
1203
6832ef664673
source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents:
1194
diff
changeset
|
23 # |
252
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
24 # You should have received a copy of the GNU General Public License |
1206
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
25 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1964
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
26 import sys |
1118
b0e2c949c34b
Fixed Windows installation based on work of Mantis406 fork: "Replace py-bcrypt to make Windows installation easier"
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
27 import platform |
185
3380ca40cdba
added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents:
0
diff
changeset
|
28 |
1524 | 29 VERSION = (1, 3, 0, 'beta') |
807
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
30 __version__ = '.'.join((str(each) for each in VERSION[:4])) |
1790
f551007ce085
bumped up beaker version
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
31 __dbversion__ = 4 # defines current db version for migrations |
1118
b0e2c949c34b
Fixed Windows installation based on work of Mantis406 fork: "Replace py-bcrypt to make Windows installation easier"
Marcin Kuzminski <marcin@python-works.com>
parents:
902
diff
changeset
|
32 __platform__ = platform.system() |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
33 __license__ = 'GPLv3' |
1964
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
34 __py_version__ = sys.version_info |
185
3380ca40cdba
added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents:
0
diff
changeset
|
35 |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
36 PLATFORM_WIN = ('Windows') |
1383 | 37 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS') |
1194
07963dd1f0f1
fixes for issue #133
Marcin Kuzminski <marcin@python-works.com>
parents:
1118
diff
changeset
|
38 |
1822
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
39 requirements = [ |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
40 "Pylons==1.0.0", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
41 "Beaker==1.6.2", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
42 "WebHelpers>=1.2", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
43 "formencode==1.2.4", |
1903
bdf16af5472a
bumbed sqlalchemy version
Marcin Kuzminski <marcin@python-works.com>
parents:
1824
diff
changeset
|
44 "SQLAlchemy==0.7.4", |
1822
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
45 "Mako==0.5.0", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
46 "pygments>=1.4", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
47 "whoosh<1.8", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
48 "celery>=2.2.5,<2.3", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
49 "babel", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
50 "python-dateutil>=1.5.0,<2.0.0", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
51 "dulwich>=0.8.0,<0.9.0", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
52 "vcs>=0.2.3.dev", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
53 "webob==1.0.8", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
54 "markdown==2.0.3", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
55 "docutils==0.8.1", |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
56 ] |
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
57 |
1964
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
58 if __py_version__ < (2, 6): |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
59 requirements.append("simplejson") |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
60 requirements.append("pysqlite") |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
61 |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
62 if __platform__ in PLATFORM_WIN: |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
63 requirements.append("mercurial==2.0.1") |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
64 else: |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
65 requirements.append("py-bcrypt") |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
66 requirements.append("mercurial>=2.0,<2.1") |
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
67 |
1822
363f5dce1a95
added requires.txt file
Marcin Kuzminski <marcin@python-works.com>
parents:
1790
diff
changeset
|
68 |
852
b76da6f22e0f
fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents:
836
diff
changeset
|
69 try: |
1541
70e646b2806a
fixes rhodecode upgrade problem that caused setuptool to crash on importing sqlalchemy models
Marcin Kuzminski <marcin@python-works.com>
parents:
1524
diff
changeset
|
70 from rhodecode.lib import get_current_revision |
852
b76da6f22e0f
fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents:
836
diff
changeset
|
71 _rev = get_current_revision() |
b76da6f22e0f
fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents:
836
diff
changeset
|
72 except ImportError: |
1790
f551007ce085
bumped up beaker version
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
73 # this is needed when doing some setup.py operations |
852
b76da6f22e0f
fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents:
836
diff
changeset
|
74 _rev = False |
827
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
75 |
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
76 if len(VERSION) > 3 and _rev: |
807
e8c9ff1da9ba
added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents:
710
diff
changeset
|
77 __version__ += ' [rev:%s]' % _rev[0] |
185
3380ca40cdba
added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents:
0
diff
changeset
|
78 |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
79 |
185
3380ca40cdba
added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents:
0
diff
changeset
|
80 def get_version(): |
827
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
81 """Returns shorter version (digit parts only) as string.""" |
c3480c69fa4e
small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents:
807
diff
changeset
|
82 |
185
3380ca40cdba
added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents:
0
diff
changeset
|
83 return '.'.join((str(each) for each in VERSION[:3])) |
710
e2f3c8e6939d
Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents:
631
diff
changeset
|
84 |
e2f3c8e6939d
Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents:
631
diff
changeset
|
85 BACKENDS = { |
e2f3c8e6939d
Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents:
631
diff
changeset
|
86 'hg': 'Mercurial repository', |
1756 | 87 'git': 'Git repository', |
710
e2f3c8e6939d
Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents:
631
diff
changeset
|
88 } |
1723
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1541
diff
changeset
|
89 |
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1541
diff
changeset
|
90 CELERY_ON = False |
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1541
diff
changeset
|
91 |
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1541
diff
changeset
|
92 # link to config for pylons |
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1541
diff
changeset
|
93 CONFIG = None |