##// END OF EJS Templates
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 -
r8053:aa6f17a5 default
parent child Browse files
Show More
@@ -126,7 +126,7 b' commit_parse_limit = 25'
126 126 ## used, which is correct in many cases but for example not when using uwsgi.
127 127 ## If you change this setting, you should reinstall the Git hooks via
128 128 ## Admin > Settings > Remap and Rescan.
129 # git_hook_interpreter = /srv/kallithea/venv/bin/python2
129 # git_hook_interpreter = /srv/kallithea/venv/bin/python3
130 130
131 131 ## path to git executable
132 132 git_path = git
@@ -31,6 +31,9 b' import platform'
31 31 import sys
32 32
33 33
34 if sys.version_info < (3, 6):
35 raise Exception('Kallithea requires python 3.6 or later')
36
34 37 VERSION = (0, 5, 99)
35 38 BACKENDS = {
36 39 'hg': 'Mercurial repository',
@@ -220,7 +220,7 b' commit_parse_limit = 25'
220 220 <%text>## used, which is correct in many cases but for example not when using uwsgi.</%text>
221 221 <%text>## If you change this setting, you should reinstall the Git hooks via</%text>
222 222 <%text>## Admin > Settings > Remap and Rescan.</%text>
223 # git_hook_interpreter = /srv/kallithea/venv/bin/python2
223 # git_hook_interpreter = /srv/kallithea/venv/bin/python3
224 224 %if git_hook_interpreter:
225 225 git_hook_interpreter = ${git_hook_interpreter}
226 226 %endif
@@ -700,7 +700,7 b' class ScmModel(object):'
700 700 # FIXME This may not work on Windows and may need a shell wrapper script.
701 701 return (kallithea.CONFIG.get('git_hook_interpreter')
702 702 or sys.executable
703 or '/usr/bin/env python2')
703 or '/usr/bin/env python3')
704 704
705 705 def install_git_hooks(self, repo, force_create=False):
706 706 """
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2 # -*- coding: utf-8 -*-
3 3 # This program is free software: you can redistribute it and/or modify
4 4 # it under the terms of the GNU General Public License as published by
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2
3 3 """
4 4 Consistent formatting of rst section titles
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2 """
3 3 Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini
4 4 """
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2
3 3 from __future__ import print_function
4 4
@@ -15,7 +15,7 b' venv=$(mktemp -d --tmpdir kallithea-rele'
15 15 trap cleanup EXIT
16 16
17 17 echo "Setting up a fresh virtualenv in $venv"
18 virtualenv -p python2 "$venv"
18 virtualenv -p python3 "$venv"
19 19 . "$venv/bin/activate"
20 20
21 21 echo "Install/verify tools needed for building and uploading stuff"
@@ -35,8 +35,8 b' echo "Check that each entry in MANIFEST.'
35 35 sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/g' MANIFEST.in | xargs ls -lad
36 36
37 37 echo "Build dist"
38 python2 setup.py compile_catalog
39 python2 setup.py sdist
38 python3 setup.py compile_catalog
39 python3 setup.py sdist
40 40
41 41 echo "Verify VERSION from kallithea/__init__.py"
42 42 namerel=$(cd dist && echo Kallithea-*.tar.gz)
@@ -49,7 +49,7 b' echo "Verify dist file content"'
49 49 diff -u <((hg mani | grep -v '^\.hg\|^kallithea/i18n/en/LC_MESSAGES/kallithea.mo$') | LANG=C sort) <(tar tf dist/Kallithea-$version.tar.gz | sed "s|^$namerel/||" | grep . | grep -v '^kallithea/i18n/.*/LC_MESSAGES/kallithea.mo$\|^Kallithea.egg-info/\|^PKG-INFO$\|/$' | LANG=C sort)
50 50
51 51 echo "Verify docs build"
52 python2 setup.py build_sphinx # the results are not actually used, but we want to make sure it builds
52 python3 setup.py build_sphinx # the results are not actually used, but we want to make sure it builds
53 53
54 54 echo "Shortlog for inclusion in the release announcement"
55 55 scripts/shortlog.py "only('.', branch('stable') & tagged() & public() & not '.')"
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2 # -*- coding: utf-8 -*-
3 3
4 4 """
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2 # -*- coding: utf-8 -*-
3 3
4 4 """
@@ -34,7 +34,7 b' for rev in $(hg log -r "$1" -T \'{node}\\n'
34 34 hg update "$rev"
35 35
36 36 cleanup
37 virtualenv -p "$(command -v python2)" "$venv"
37 virtualenv -p "$(command -v python3)" "$venv"
38 38 source "$venv/bin/activate"
39 39 pip install --upgrade pip setuptools
40 40 pip install -e . -r dev_requirements.txt python-ldap python-pam
@@ -28,7 +28,7 b' mkdir -p "$venv"'
28 28 sed -n 's/.*"\(.*\)>=\(.*\)".*/\1==\2/p' setup.py > "$min_requirements"
29 29 sed 's/>=/==/p' dev_requirements.txt >> "$min_requirements"
30 30
31 virtualenv -p "$(command -v python2)" "$venv"
31 virtualenv -p "$(command -v python3)" "$venv"
32 32 source "$venv/bin/activate"
33 33 pip install --upgrade pip setuptools
34 34 pip install -e . -r "$min_requirements" python-ldap python-pam 2> >(tee "$log" >&2)
@@ -1,4 +1,4 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python3
2 2 # -*- coding: utf-8 -*-
3 3 import os
4 4 import platform
@@ -11,6 +11,9 b' from setuptools.command import sdist'
11 11
12 12 if sys.version_info < (2, 6) or sys.version_info >= (3,):
13 13 raise Exception('Kallithea requires python 2.7')
14 # But temporarily, at the same time:
15 if sys.version_info < (3, 6):
16 raise Exception('Kallithea requires Python 3.6 or later')
14 17
15 18
16 19 here = os.path.abspath(os.path.dirname(__file__))
@@ -62,7 +65,7 b' requirements = ['
62 65 "URLObject >= 2.3.4, < 2.5",
63 66 "Routes >= 2.0, < 2.5",
64 67 "dulwich >= 0.19.0, < 0.20",
65 "mercurial >= 5.1, < 5.4",
68 "mercurial >= 5.2, < 5.4",
66 69 "decorator >= 4.2.1, < 4.5",
67 70 "Paste >= 2.0.3, < 3.1",
68 71 "bleach >= 3.0, < 3.2",
General Comments 0
You need to be logged in to leave comments. Login now