##// END OF EJS Templates
added __license__ into main of rhodecode, PEP8ify
marcink -
r1205:f4807acf beta
parent child Browse files
Show More
@@ -31,9 +31,10 b" VERSION = (1, 2, 0, 'beta')"
31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
32 __dbversion__ = 3 #defines current db version for migrations
32 __dbversion__ = 3 #defines current db version for migrations
33 __platform__ = platform.system()
33 __platform__ = platform.system()
34 __license__ = 'GPLv3'
34
35
35 PLATFORM_WIN = ('Windows',)
36 PLATFORM_WIN = ('Windows')
36 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD',)
37 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD')
37
38
38 try:
39 try:
39 from rhodecode.lib.utils import get_current_revision
40 from rhodecode.lib.utils import get_current_revision
@@ -45,6 +46,7 b' except ImportError:'
45 if len(VERSION) > 3 and _rev:
46 if len(VERSION) > 3 and _rev:
46 __version__ += ' [rev:%s]' % _rev[0]
47 __version__ += ' [rev:%s]' % _rev[0]
47
48
49
48 def get_version():
50 def get_version():
49 """Returns shorter version (digit parts only) as string."""
51 """Returns shorter version (digit parts only) as string."""
50
52
@@ -21,6 +21,7 b' from rhodecode.lib.timerproxy import Tim'
21
21
22 log = logging.getLogger(__name__)
22 log = logging.getLogger(__name__)
23
23
24
24 def load_environment(global_conf, app_conf, initial=False):
25 def load_environment(global_conf, app_conf, initial=False):
25 """Configure the Pylons environment via the ``pylons.config``
26 """Configure the Pylons environment via the ``pylons.config``
26 object
27 object
@@ -67,7 +68,7 b' def load_environment(global_conf, app_co'
67 if config['debug'] and not test:
68 if config['debug'] and not test:
68 #use query time debugging.
69 #use query time debugging.
69 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
70 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
70 proxy=TimerProxy())
71 proxy=TimerProxy())
71 else:
72 else:
72 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
73 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
73
74
@@ -16,6 +16,7 b' from rhodecode.lib.middleware.simplegit '
16 from rhodecode.lib.middleware.https_fixup import HttpsFixup
16 from rhodecode.lib.middleware.https_fixup import HttpsFixup
17 from rhodecode.config.environment import load_environment
17 from rhodecode.config.environment import load_environment
18
18
19
19 def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
20 def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
20 """Create a Pylons WSGI application and return it
21 """Create a Pylons WSGI application and return it
21
22
@@ -9,6 +9,7 b' from __future__ import with_statement'
9 from routes import Mapper
9 from routes import Mapper
10 from rhodecode.lib.utils import check_repo_fast as cr
10 from rhodecode.lib.utils import check_repo_fast as cr
11
11
12
12 def make_map(config):
13 def make_map(config):
13 """Create, configure and return the routes Mapper"""
14 """Create, configure and return the routes Mapper"""
14 routes_map = Mapper(directory=config['pylons.paths']['controllers'],
15 routes_map = Mapper(directory=config['pylons.paths']['controllers'],
@@ -39,7 +40,6 b' def make_map(config):'
39 routes_map.connect('home', '/', controller='home', action='index')
40 routes_map.connect('home', '/', controller='home', action='index')
40 routes_map.connect('repo_switcher', '/repos', controller='home', action='repo_switcher')
41 routes_map.connect('repo_switcher', '/repos', controller='home', action='repo_switcher')
41 routes_map.connect('bugtracker', "http://bitbucket.org/marcinkuzminski/rhodecode/issues", _static=True)
42 routes_map.connect('bugtracker', "http://bitbucket.org/marcinkuzminski/rhodecode/issues", _static=True)
42 routes_map.connect('gpl_license', "http://www.gnu.org/licenses/gpl.html", _static=True)
43 routes_map.connect('rhodecode_official', "http://rhodecode.org", _static=True)
43 routes_map.connect('rhodecode_official', "http://rhodecode.org", _static=True)
44
44
45 #ADMIN REPOSITORY REST ROUTES
45 #ADMIN REPOSITORY REST ROUTES
@@ -114,7 +114,7 b' def make_map(config):'
114 ##ADMIN LDAP SETTINGS
114 ##ADMIN LDAP SETTINGS
115 routes_map.connect('ldap_settings', '/_admin/ldap', controller='admin/ldap_settings',
115 routes_map.connect('ldap_settings', '/_admin/ldap', controller='admin/ldap_settings',
116 action='ldap_settings', conditions=dict(method=["POST"]))
116 action='ldap_settings', conditions=dict(method=["POST"]))
117 routes_map.connect('ldap_home', '/_admin/ldap', controller='admin/ldap_settings',)
117 routes_map.connect('ldap_home', '/_admin/ldap', controller='admin/ldap_settings')
118
118
119
119
120 #ADMIN SETTINGS REST ROUTES
120 #ADMIN SETTINGS REST ROUTES
@@ -156,7 +156,7 b' def make_map(config):'
156
156
157
157
158 #USER JOURNAL
158 #USER JOURNAL
159 routes_map.connect('journal', '/_admin/journal', controller='journal',)
159 routes_map.connect('journal', '/_admin/journal', controller='journal')
160 routes_map.connect('public_journal', '/_admin/public_journal', controller='journal', action="public_journal")
160 routes_map.connect('public_journal', '/_admin/public_journal', controller='journal', action="public_journal")
161 routes_map.connect('public_journal_rss', '/_admin/public_journal_rss', controller='journal', action="public_journal_rss")
161 routes_map.connect('public_journal_rss', '/_admin/public_journal_rss', controller='journal', action="public_journal_rss")
162 routes_map.connect('public_journal_atom', '/_admin/public_journal_atom', controller='journal', action="public_journal_atom")
162 routes_map.connect('public_journal_atom', '/_admin/public_journal_atom', controller='journal', action="public_journal_atom")
@@ -166,7 +166,7 b' def make_map(config):'
166
166
167
167
168 #SEARCH
168 #SEARCH
169 routes_map.connect('search', '/_admin/search', controller='search',)
169 routes_map.connect('search', '/_admin/search', controller='search')
170 routes_map.connect('search_repo', '/_admin/search/{search_repo:.*}', controller='search')
170 routes_map.connect('search_repo', '/_admin/search/{search_repo:.*}', controller='search')
171
171
172 #LOGIN/LOGOUT/REGISTER/SIGN IN
172 #LOGIN/LOGOUT/REGISTER/SIGN IN
@@ -70,9 +70,6 b''
70 <p class="footer-link">
70 <p class="footer-link">
71 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
71 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
72 </p>
72 </p>
73 <p class="footer-link">
74 <a href="${h.url('gpl_license')}">${_('GPL license')}</a>
75 </p>
76 <p class="footer-link-right">
73 <p class="footer-link-right">
77 <a href="${h.url('rhodecode_official')}">RhodeCode</a>
74 <a href="${h.url('rhodecode_official')}">RhodeCode</a>
78 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
75 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
@@ -34,10 +34,12 b' from rhodecode.lib.db_manage import DbMa'
34
34
35 log = logging.getLogger(__name__)
35 log = logging.getLogger(__name__)
36
36
37
37 def setup_app(command, conf, vars):
38 def setup_app(command, conf, vars):
38 """Place any commands to setup rhodecode here"""
39 """Place any commands to setup rhodecode here"""
39 dbconf = conf['sqlalchemy.db1.url']
40 dbconf = conf['sqlalchemy.db1.url']
40 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], tests=False)
41 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
42 tests=False)
41 dbmanage.create_tables(override=True)
43 dbmanage.create_tables(override=True)
42 dbmanage.set_db_version()
44 dbmanage.set_db_version()
43 dbmanage.create_settings(dbmanage.config_prompt(None))
45 dbmanage.create_settings(dbmanage.config_prompt(None))
@@ -1,6 +1,7 b''
1 import sys
1 import sys
2 from rhodecode import get_version
2 from rhodecode import get_version
3 from rhodecode import __platform__
3 from rhodecode import __platform__
4 from rhodecode import __license__
4
5
5 py_version = sys.version_info
6 py_version = sys.version_info
6
7
@@ -25,7 +26,6 b" classifiers = ['Development Status :: 4 "
25 'Environment :: Web Environment',
26 'Environment :: Web Environment',
26 'Framework :: Pylons',
27 'Framework :: Pylons',
27 'Intended Audience :: Developers',
28 'Intended Audience :: Developers',
28 'License :: OSI Approved :: BSD License',
29 'Operating System :: OS Independent',
29 'Operating System :: OS Independent',
30 'Programming Language :: Python',
30 'Programming Language :: Python',
31 'Programming Language :: Python :: 2.5',
31 'Programming Language :: Python :: 2.5',
@@ -81,7 +81,7 b' setup('
81 description=description,
81 description=description,
82 long_description=long_description,
82 long_description=long_description,
83 keywords=keywords,
83 keywords=keywords,
84 license='GPLv3',
84 license=__license__,
85 author='Marcin Kuzminski',
85 author='Marcin Kuzminski',
86 author_email='marcin@python-works.com',
86 author_email='marcin@python-works.com',
87 url='http://rhodecode.org',
87 url='http://rhodecode.org',
General Comments 0
You need to be logged in to leave comments. Login now