Mercurial > kallithea
annotate kallithea/__init__.py @ 8816:c76638100ca0
deps: also report unseen known violations
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 29 Dec 2020 22:30:48 +0100 |
parents | aa8680af29c2 |
children | e9521559d013 |
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 -*- |
1206
a671db5bdd58
fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents:
1205
diff
changeset
|
2 # 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
|
3 # 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
|
4 # 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
|
5 # (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
|
6 # |
252
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
7 # 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
|
8 # 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
|
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
10 # 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
|
11 # |
252
3782a6d698af
licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
246
diff
changeset
|
12 # 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
|
13 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
14 """ |
5376
0ad053c172fa
cleanup: make module self-naming consistent
Mads Kiilerich <madski@unity3d.com>
parents:
5305
diff
changeset
|
15 kallithea |
0ad053c172fa
cleanup: make module self-naming consistent
Mads Kiilerich <madski@unity3d.com>
parents:
5305
diff
changeset
|
16 ~~~~~~~~~ |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
17 |
6215
5eec79420ce3
Turbogears2 migration: remove some references to Pylons in comments
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6206
diff
changeset
|
18 Kallithea, a web based repository management system. |
5eec79420ce3
Turbogears2 migration: remove some references to Pylons in comments
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6206
diff
changeset
|
19 |
5eec79420ce3
Turbogears2 migration: remove some references to Pylons in comments
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6206
diff
changeset
|
20 Versioning implementation: http://www.python.org/dev/peps/pep-0386/ |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
21 |
4211
1948ede028ef
RhodeCode GmbH is not the sole author of this work
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4208
diff
changeset
|
22 This file was forked by the Kallithea project in July 2014. |
1948ede028ef
RhodeCode GmbH is not the sole author of this work
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4208
diff
changeset
|
23 Original author and date, and relevant copyright and licensing information is below: |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
24 :created_on: Apr 9, 2010 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
25 :author: marcink |
4219
24498ba2fbec
SETTINGS_PREFIX for identifiers (e.g., db table names) incl. project's name.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4212
diff
changeset
|
26 :copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others. |
4208
ad38f9f93b3b
Correct licensing information in individual files.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4187
diff
changeset
|
27 :license: GPLv3, see LICENSE.md for more details. |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
28 """ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3972
diff
changeset
|
29 |
7811
0a277465fddf
scripts: initial run of import cleanup using isort
Mads Kiilerich <mads@kiilerich.com>
parents:
7808
diff
changeset
|
30 import platform |
1964
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
31 import sys |
7811
0a277465fddf
scripts: initial run of import cleanup using isort
Mads Kiilerich <mads@kiilerich.com>
parents:
7808
diff
changeset
|
32 |
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
|
33 |
8173
aa6f17a53b49
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way
Mads Kiilerich <mads@kiilerich.com>
parents:
8156
diff
changeset
|
34 if sys.version_info < (3, 6): |
aa6f17a53b49
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way
Mads Kiilerich <mads@kiilerich.com>
parents:
8156
diff
changeset
|
35 raise Exception('Kallithea requires python 3.6 or later') |
aa6f17a53b49
py3: switch to use Python 3 interpreter, temporarily leaving many things very broken until they have been migrated/fixed in a reviewable way
Mads Kiilerich <mads@kiilerich.com>
parents:
8156
diff
changeset
|
36 |
8542
ece8fbe51ef8
Kick off next release cycle (0.6.99)
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
8421
diff
changeset
|
37 VERSION = (0, 6, 99) |
3797
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
38 BACKENDS = { |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
39 'hg': 'Mercurial repository', |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
40 'git': 'Git repository', |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
41 } |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
42 |
8242
894a662b12b3
celery: refactor initialization - replace global CELERY_ON flag with CELERY_APP with the actual celery app that it indicates
Mads Kiilerich <mads@kiilerich.com>
parents:
8173
diff
changeset
|
43 CELERY_APP = None # set to Celery app instance if using Celery |
3797
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
44 |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
45 CONFIG = {} |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
46 |
8680
bc1fff7ae770
routing: move ADMIN_PREFIX constant from routing to top level kallithea module
Mads Kiilerich <mads@kiilerich.com>
parents:
8676
diff
changeset
|
47 # URL prefix for non repository related links - must start with `/` |
bc1fff7ae770
routing: move ADMIN_PREFIX constant from routing to top level kallithea module
Mads Kiilerich <mads@kiilerich.com>
parents:
8676
diff
changeset
|
48 ADMIN_PREFIX = '/_admin' |
8676
6fbbbd9a627a
db: move URL_SEP constant from db to top level kallithea module
Mads Kiilerich <mads@kiilerich.com>
parents:
8643
diff
changeset
|
49 URL_SEP = '/' |
6fbbbd9a627a
db: move URL_SEP constant from db to top level kallithea module
Mads Kiilerich <mads@kiilerich.com>
parents:
8643
diff
changeset
|
50 |
3797
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
51 # Linked module for extensions |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
52 EXTENSIONS = {} |
2136
b70721d03e84
pep386 versioning
Marcin Kuzminski <marcin@python-works.com>
parents:
2135
diff
changeset
|
53 |
6201
d55ff973d01f
lib: simplify version; drop get_current_revision - it was run every time on import time - we don't want that
Mads Kiilerich <madski@unity3d.com>
parents:
6014
diff
changeset
|
54 __version__ = '.'.join(str(each) for each in VERSION) |
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
|
55 __platform__ = platform.system() |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
56 __license__ = 'GPLv3' |
1964
b1ad9efeec14
fixed requires files, added distinction on win vs other platforms
Marcin Kuzminski <marcin@python-works.com>
parents:
1903
diff
changeset
|
57 __py_version__ = sys.version_info |
4211
1948ede028ef
RhodeCode GmbH is not the sole author of this work
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4208
diff
changeset
|
58 __author__ = "Various Authors" |
4184
48ad84558fb4
Change project URL - use kallithea-scm.org
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4116
diff
changeset
|
59 __url__ = 'https://kallithea-scm.org/' |
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
|
60 |
3892
3a1cf70e0f42
Fix check statements from () which had no effect really
Marcin Kuzminski <marcin@python-works.com>
parents:
3797
diff
changeset
|
61 is_windows = __platform__ in ['Windows'] |
2634
4b17216f2110
Deprecated validation of operating system, we just care if it's windows, let approve all other
Marcin Kuzminski <marcin@python-works.com>
parents:
2563
diff
changeset
|
62 is_unix = not is_windows |