Show More
@@ -1,248 +1,248 b'' | |||
|
1 | 1 | ================ |
|
2 | 2 | Kallithea README |
|
3 | 3 | ================ |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | About |
|
7 | 7 | ----- |
|
8 | 8 | |
|
9 | 9 | **Kallithea** is a fast and powerful management tool for Mercurial_ and Git_ |
|
10 | 10 | with a built-in push/pull server, full text search and code-review. It works on |
|
11 | 11 | http/https and has a built in permission/authentication system with the ability |
|
12 | 12 | to authenticate via LDAP or ActiveDirectory. Kallithea also provides simple API |
|
13 | 13 | so it's easy to integrate with existing external systems. |
|
14 | 14 | |
|
15 | 15 | Kallithea is similar in some respects to GitHub_ or Bitbucket_, however |
|
16 | 16 | Kallithea can be run as standalone hosted application on your own server. It is |
|
17 | 17 | open-source donationware and focuses more on providing a customised, |
|
18 | 18 | self-administered interface for Mercurial_ and Git_ repositories. Kallithea |
|
19 | 19 | works on Unix-like systems and Windows, and is powered by the vcs_ library |
|
20 | 20 | created by Εukasz Balcerzak and Marcin KuΕΊmiΕski to uniformly handle multiple |
|
21 | 21 | version control systems. |
|
22 | 22 | |
|
23 | 23 | Kallithea was forked from RhodeCode in July 2014 and has been heavily modified. |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | Installation |
|
27 | 27 | ------------ |
|
28 | 28 | |
|
29 | 29 | Kallithea requires Python_ 2.x and it is recommended to install it in a |
|
30 | 30 | virtualenv_. Official releases of Kallithea can be installed with:: |
|
31 | 31 | |
|
32 | 32 | pip install kallithea |
|
33 | 33 | |
|
34 | 34 | The development repository is kept very stable and used in production by the |
|
35 | 35 | developers -- you can do the same. |
|
36 | 36 | |
|
37 | 37 | Please visit https://docs.kallithea-scm.org/en/latest/installation.html for |
|
38 | 38 | more details. |
|
39 | 39 | |
|
40 | 40 | There is also an experimental `Puppet module`_ for installing and setting up |
|
41 | 41 | Kallithea. Currently, only basic functionality is provided, but it is still |
|
42 | 42 | enough to get up and running quickly, especially for people without Python |
|
43 | 43 | background. See |
|
44 | 44 | https://docs.kallithea-scm.org/en/latest/installation_puppet.html for further |
|
45 | 45 | information. |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | Source code |
|
49 | 49 | ----------- |
|
50 | 50 | |
|
51 | 51 | The latest sources can be obtained from |
|
52 | 52 | https://kallithea-scm.org/repos/kallithea. |
|
53 | 53 | |
|
54 | 54 | The issue tracker and a repository mirror can be found at Bitbucket_ on |
|
55 | 55 | https://bitbucket.org/conservancy/kallithea. |
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | Kallithea features |
|
59 | 59 | ------------------ |
|
60 | 60 | |
|
61 | 61 | - Has its own middleware to handle Mercurial_ and Git_ protocol requests. Each |
|
62 | 62 | request is authenticated and logged together with IP address. |
|
63 | 63 | - Built for speed and performance. You can make multiple pulls/pushes |
|
64 | 64 | simultaneously. Proven to work with thousands of repositories and users. |
|
65 | 65 | - Supports http/https, LDAP, AD, proxy-pass authentication. |
|
66 | 66 | - Full permissions (private/read/write/admin) together with IP restrictions for |
|
67 | 67 | each repository, additional explicit forking, repositories group and |
|
68 | 68 | repository creation permissions. |
|
69 | 69 | - User groups for easier permission management. |
|
70 | 70 | - Repository groups let you group repos and manage them easier. They come with |
|
71 | 71 | permission delegation features, so you can delegate groups management. |
|
72 | 72 | - Users can fork other users repos, and compare them at any time. |
|
73 | 73 | - Built-in versioned paste functionality (Gist) for sharing code snippets. |
|
74 | 74 | - Integrates easily with other systems, with custom created mappers you can |
|
75 | 75 | connect it to almost any issue tracker, and with a JSON-RPC API you can make |
|
76 | 76 | much more. |
|
77 | 77 | - Built-in commit API lets you add, edit and commit files right from Kallithea |
|
78 | 78 | web interface using simple editor or upload binary files using simple form. |
|
79 | 79 | - Powerful pull request driven review system with inline commenting, changeset |
|
80 | 80 | statuses, and notification system. |
|
81 | 81 | - Importing and syncing repositories from remote locations for Git_, Mercurial_ |
|
82 | 82 | and Subversion. |
|
83 | 83 | - Mako templates let you customize the look and feel of the application. |
|
84 | 84 | - Beautiful diffs, annotations and source code browsing all colored by |
|
85 | 85 | pygments. Raw diffs are made in Git-diff format for both VCS systems, |
|
86 | 86 | including Git_ binary-patches. |
|
87 | 87 | - Mercurial_ and Git_ DAG graphs and Flot-powered graphs with zooming and |
|
88 | 88 | statistics to track activity for repositories. |
|
89 | 89 | - Admin interface with user/permission management. Admin activity journal, logs |
|
90 | 90 | pulls, pushes, forks, registrations and other actions made by all users. |
|
91 | 91 | - Server side forks. It is possible to fork a project and modify it freely |
|
92 | 92 | without breaking the main repository. |
|
93 | 93 | - reST and Markdown README support for repositories. |
|
94 | 94 | - Full text search powered by Whoosh on the source files, commit messages, and |
|
95 | 95 | file names. Built-in indexing daemons, with optional incremental index build |
|
96 | 96 | (no external search servers required all in one application). |
|
97 | 97 | - Setup project descriptions/tags and info inside built in DB for easy, |
|
98 | 98 | non-filesystem operations. |
|
99 | 99 | - Intelligent cache with invalidation after push or project change, provides |
|
100 | 100 | high performance and always up to date data. |
|
101 | 101 | - RSS/Atom feeds, Gravatar support, downloadable sources as zip/tar/gz. |
|
102 | 102 | - Optional async tasks for speed and performance using Celery_. |
|
103 | 103 | - Backup scripts can do backup of whole app and send it over scp to desired |
|
104 | 104 | location. |
|
105 | 105 | - Based on Pylons, SQLAlchemy, SQLite, Whoosh, vcs. |
|
106 | 106 | |
|
107 | 107 | |
|
108 | 108 | License |
|
109 | 109 | ------- |
|
110 | 110 | |
|
111 | 111 | **Kallithea** is released under the GPLv3 license. Kallithea is a `Software |
|
112 | 112 | Freedom Conservancy`_ project and thus controlled by a non-profit organization. |
|
113 | 113 | No commercial entity can take ownership of the project and change the |
|
114 | 114 | direction. |
|
115 | 115 | |
|
116 | 116 | Kallithea started out as an effort to make sure the existing GPLv3 codebase |
|
117 | 117 | would stay available under a legal license. Kallithea thus has to stay GPLv3 |
|
118 | 118 | compatible ... but we are also happy it is GPLv3 and happy to keep it that way. |
|
119 | 119 | A different license (such as AGPL) could perhaps help attract a different |
|
120 | 120 | community with a different mix of Free Software people and companies but we are |
|
121 | 121 | happy with the current focus. |
|
122 | 122 | |
|
123 | 123 | |
|
124 | 124 | Community |
|
125 | 125 | --------- |
|
126 | 126 | |
|
127 | 127 | **Kallithea** is maintained by its users who contribute the fixes they would |
|
128 | 128 | like to see. |
|
129 | 129 | |
|
130 | 130 | Get in touch with the rest of the community: |
|
131 | 131 | |
|
132 | 132 | - Join the mailing list users and developers -- see |
|
133 | 133 | http://lists.sfconservancy.org/mailman/listinfo/kallithea-general. |
|
134 | 134 | |
|
135 | 135 | - Use IRC and join #kallithea on FreeNode (irc.freenode.net) or use |
|
136 | 136 | http://webchat.freenode.net/?channels=kallithea. |
|
137 | 137 | |
|
138 | 138 | - Follow Kallithea on Twitter, **@KallitheaSCM**. |
|
139 | 139 | |
|
140 | 140 | - Issues can be reported at `issue tracker |
|
141 | 141 | <https://bitbucket.org/conservancy/kallithea/issues>`_. |
|
142 | 142 | |
|
143 | 143 | .. note:: |
|
144 | 144 | |
|
145 | 145 | Please try to read the documentation before posting any issues, |
|
146 | 146 | especially the **troubleshooting section** |
|
147 | 147 | |
|
148 | 148 | |
|
149 | 149 | Online documentation |
|
150 | 150 | -------------------- |
|
151 | 151 | |
|
152 | 152 | Online documentation for the current version of Kallithea is available at |
|
153 | 153 | https://pythonhosted.org/Kallithea/. Documentation for the current development |
|
154 | 154 | version can be found on https://docs.kallithea-scm.org/. |
|
155 | 155 | |
|
156 | 156 | You can also build the documentation locally: go to ``docs/`` and run:: |
|
157 | 157 | |
|
158 | 158 | make html |
|
159 | 159 | |
|
160 | 160 | .. note:: You need to have Sphinx_ installed to build the |
|
161 | 161 | documentation. If you don't have Sphinx_ installed you can |
|
162 | 162 | install it via the command: ``pip install sphinx`` . |
|
163 | 163 | |
|
164 | 164 | |
|
165 | 165 | Converting from RhodeCode |
|
166 | 166 | ------------------------- |
|
167 | 167 | |
|
168 | 168 | Currently, you have two options for working with an existing RhodeCode |
|
169 | 169 | database: |
|
170 | 170 | |
|
171 | 171 | - keep the database unconverted (intended for testing and evaluation) |
|
172 | 172 | - convert the database in a one-time step |
|
173 | 173 | |
|
174 | 174 | Maintaining interoperability |
|
175 | 175 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
176 | 176 | |
|
177 | 177 | Interoperability with RhodeCode 2.2.X installations is provided so you don't |
|
178 | 178 | have to immediately commit to switching to Kallithea. This option will most |
|
179 | 179 | likely go away once the two projects have diverged significantly. |
|
180 | 180 | |
|
181 | 181 | To run Kallithea on a RhodeCode database, run:: |
|
182 | 182 | |
|
183 | 183 | echo "BRAND = 'rhodecode'" > kallithea/brand.py |
|
184 | 184 | |
|
185 | 185 | This location will depend on where you installed Kallithea. If you installed |
|
186 | 186 | via:: |
|
187 | 187 | |
|
188 | python setup.py install | |
|
188 | python2 setup.py install | |
|
189 | 189 | |
|
190 | 190 | then you will find this location at |
|
191 | 191 | ``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-0.1-py2.7.egg/kallithea``. |
|
192 | 192 | |
|
193 | 193 | One-time conversion |
|
194 | 194 | ~~~~~~~~~~~~~~~~~~~ |
|
195 | 195 | |
|
196 | 196 | Alternatively, if you would like to convert the database for good, you can use |
|
197 | 197 | a helper script provided by Kallithea. This script will operate directly on the |
|
198 | 198 | database, using the database string you can find in your ``production.ini`` (or |
|
199 | 199 | ``development.ini``) file. For example, if using SQLite:: |
|
200 | 200 | |
|
201 | 201 | cd /path/to/kallithea |
|
202 | 202 | cp /path/to/rhodecode/rhodecode.db kallithea.db |
|
203 | 203 | pip install sqlalchemy-migrate |
|
204 | python kallithea/bin/rebranddb.py sqlite:///kallithea.db | |
|
204 | python2 kallithea/bin/rebranddb.py sqlite:///kallithea.db | |
|
205 | 205 | |
|
206 | 206 | .. Note:: |
|
207 | 207 | |
|
208 | 208 | If you started out using the branding interoperability approach mentioned |
|
209 | 209 | above, watch out for stray brand.pyc after removing brand.py. |
|
210 | 210 | |
|
211 | 211 | Git hooks |
|
212 | 212 | ~~~~~~~~~ |
|
213 | 213 | |
|
214 | 214 | After switching to Kallithea, it will be necessary to update the Git_ hooks in |
|
215 | 215 | your repositories. If not, the Git_ hooks from RhodeCode will still be called, |
|
216 | 216 | which will cause ``git push`` to fail every time. |
|
217 | 217 | |
|
218 | 218 | If you do not have any custom Git_ hooks deployed, perform the following steps |
|
219 | 219 | (this may take some time depending on the number and size of repositories you |
|
220 | 220 | have): |
|
221 | 221 | |
|
222 | 222 | 1. Log-in as an administrator. |
|
223 | 223 | |
|
224 | 224 | 2. Open page *Admin > Settings > Remap and Rescan*. |
|
225 | 225 | |
|
226 | 226 | 3. Turn on the option **Install Git Hooks**. |
|
227 | 227 | |
|
228 | 228 | 4. Turn on the option **Overwrite existing Git hooks**. |
|
229 | 229 | |
|
230 | 230 | 5. Click on the button **Rescan Repositories**. |
|
231 | 231 | |
|
232 | 232 | If you do have custom hooks, you will need to merge those changes manually. In |
|
233 | 233 | order to get sample hooks from Kallithea, the easiest way is to create a new Git_ |
|
234 | 234 | repository, and have a look at the hooks deployed there. |
|
235 | 235 | |
|
236 | 236 | |
|
237 | 237 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
238 | 238 | .. _Python: http://www.python.org/ |
|
239 | 239 | .. _Sphinx: http://sphinx.pocoo.org/ |
|
240 | 240 | .. _Mercurial: http://mercurial.selenic.com/ |
|
241 | 241 | .. _Bitbucket: http://bitbucket.org/ |
|
242 | 242 | .. _GitHub: http://github.com/ |
|
243 | 243 | .. _Subversion: http://subversion.tigris.org/ |
|
244 | 244 | .. _Git: http://git-scm.com/ |
|
245 | 245 | .. _Celery: http://celeryproject.org/ |
|
246 | 246 | .. _vcs: http://pypi.python.org/pypi/vcs |
|
247 | 247 | .. _Software Freedom Conservancy: http://sfconservancy.org/ |
|
248 | 248 | .. _Puppet module: https://forge.puppetlabs.com/rauch/kallithea |
@@ -1,159 +1,159 b'' | |||
|
1 | 1 | .. _contributing: |
|
2 | 2 | |
|
3 | 3 | ========================= |
|
4 | 4 | Contributing to Kallithea |
|
5 | 5 | ========================= |
|
6 | 6 | |
|
7 | 7 | Kallithea is developed and maintained by its users. Please join us and scratch |
|
8 | 8 | your own itch. |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | Infrastructure |
|
12 | 12 | -------------- |
|
13 | 13 | |
|
14 | 14 | The main repository is hosted on Our Own Kallithea (aka OOK) at |
|
15 | 15 | https://kallithea-scm.org/repos/kallithea/, our self-hosted instance |
|
16 | 16 | of Kallithea. |
|
17 | 17 | |
|
18 | 18 | For now, we use Bitbucket_ for `pull requests`_ and `issue tracking`_. The |
|
19 | 19 | issue tracker is for tracking bugs, not for support, discussion, or ideas -- |
|
20 | 20 | please use the `mailing list`_ or :ref:`IRC <readme>` to reach the community. |
|
21 | 21 | |
|
22 | 22 | We use Weblate_ to translate the user interface messages into languages other |
|
23 | 23 | than English. Join our project on `Hosted Weblate`_ to help us. |
|
24 | 24 | To register, you can use your Bitbucket or GitHub account. See :ref:`translations` |
|
25 | 25 | for more details. |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | Getting started |
|
29 | 29 | --------------- |
|
30 | 30 | |
|
31 | 31 | To get started with development:: |
|
32 | 32 | |
|
33 | 33 | hg clone https://kallithea-scm.org/repos/kallithea |
|
34 | 34 | cd kallithea |
|
35 | 35 | virtualenv ../kallithea-venv |
|
36 | 36 | source ../kallithea-venv/bin/activate |
|
37 | python setup.py develop | |
|
37 | python2 setup.py develop | |
|
38 | 38 | paster make-config Kallithea my.ini |
|
39 | 39 | paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp |
|
40 | 40 | paster serve my.ini --reload & |
|
41 | 41 | firefox http://127.0.0.1:5000/ |
|
42 | 42 | |
|
43 | 43 | You can also start out by forking https://bitbucket.org/conservancy/kallithea |
|
44 | 44 | on Bitbucket_ and create a local clone of your own fork. |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | Running tests |
|
48 | 48 | ------------- |
|
49 | 49 | |
|
50 | 50 | After finishing your changes make sure all tests pass cleanly. You can run |
|
51 | 51 | the testsuite running ``nosetests`` from the project root, or if you use tox |
|
52 | 52 | run ``tox`` for Python 2.6--2.7 with multiple database test. |
|
53 | 53 | |
|
54 | 54 | When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the |
|
55 | 55 | SQLite database specified there. |
|
56 | 56 | |
|
57 | 57 | It is possible to avoid recreating the full test database on each invocation of |
|
58 | 58 | the tests, thus eliminating the initial delay. To achieve this, run the tests as:: |
|
59 | 59 | |
|
60 | 60 | paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon |
|
61 | 61 | KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests |
|
62 | 62 | kill -9 $(cat test.pid) |
|
63 | 63 | |
|
64 | 64 | You can run individual tests by specifying their path as argument to nosetests. |
|
65 | 65 | nosetests also has many more options, see `nosetests -h`. Some useful options |
|
66 | 66 | are:: |
|
67 | 67 | |
|
68 | 68 | -x, --stop Stop running tests after the first error or failure |
|
69 | 69 | -s, --nocapture Don't capture stdout (any stdout output will be |
|
70 | 70 | printed immediately) [NOSE_NOCAPTURE] |
|
71 | 71 | --failed Run the tests that failed in the last test run. |
|
72 | 72 | |
|
73 | 73 | |
|
74 | 74 | Coding/contribution guidelines |
|
75 | 75 | ------------------------------ |
|
76 | 76 | |
|
77 | 77 | Kallithea is GPLv3 and we assume all contributions are made by the |
|
78 | 78 | committer/contributor and under GPLv3 unless explicitly stated. We do care a |
|
79 | 79 | lot about preservation of copyright and license information for existing code |
|
80 | 80 | that is brought into the project. |
|
81 | 81 | |
|
82 | 82 | We don't have a formal coding/formatting standard. We are currently using a mix |
|
83 | 83 | of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and |
|
84 | 84 | consistency with existing code. Run whitespacecleanup.sh to avoid stupid |
|
85 | 85 | whitespace noise in your patches. |
|
86 | 86 | |
|
87 | 87 | We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care |
|
88 | 88 | about Python 3 compatibility. |
|
89 | 89 | |
|
90 | 90 | We try to support the most common modern web browsers. IE9 is still supported |
|
91 | 91 | to the extent it is feasible, IE8 is not. |
|
92 | 92 | |
|
93 | 93 | We primarily support Linux and OS X on the server side but Windows should also work. |
|
94 | 94 | |
|
95 | 95 | HTML templates should use 2 spaces for indentation ... but be pragmatic. We |
|
96 | 96 | should use templates cleverly and avoid duplication. We should use reasonable |
|
97 | 97 | semantic markup with element classes and IDs that can be used for styling and testing. |
|
98 | 98 | We should only use inline styles in places where it really is semantic (such as |
|
99 | 99 | ``display: none``). |
|
100 | 100 | |
|
101 | 101 | JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline |
|
102 | 102 | multiline functions should be indented two levels -- one for the ``()`` and one for |
|
103 | 103 | ``{}``. |
|
104 | 104 | Variables holding jQuery objects should be named with a leading ``$``. |
|
105 | 105 | |
|
106 | 106 | Commit messages should have a leading short line summarizing the changes. For |
|
107 | 107 | bug fixes, put ``(Issue #123)`` at the end of this line. |
|
108 | 108 | |
|
109 | 109 | Use American English grammar and spelling overall. Use `English title case`_ for |
|
110 | 110 | page titles, button labels, headers, and 'labels' for fields in forms. |
|
111 | 111 | |
|
112 | 112 | .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case |
|
113 | 113 | |
|
114 | 114 | Contributions will be accepted in most formats -- such as pull requests on |
|
115 | 115 | bitbucket, something hosted on your own Kallithea instance, or patches sent by |
|
116 | 116 | email to the `kallithea-general`_ mailing list. |
|
117 | 117 | |
|
118 | 118 | Make sure to test your changes both manually and with the automatic tests |
|
119 | 119 | before posting. |
|
120 | 120 | |
|
121 | 121 | We care about quality and review and keeping a clean repository history. We |
|
122 | 122 | might give feedback that requests polishing contributions until they are |
|
123 | 123 | "perfect". We might also rebase and collapse and make minor adjustments to your |
|
124 | 124 | changes when we apply them. |
|
125 | 125 | |
|
126 | 126 | We try to make sure we have consensus on the direction the project is taking. |
|
127 | 127 | Everything non-sensitive should be discussed in public -- preferably on the |
|
128 | 128 | mailing list. We aim at having all non-trivial changes reviewed by at least |
|
129 | 129 | one other core developer before pushing. Obvious non-controversial changes will |
|
130 | 130 | be handled more casually. |
|
131 | 131 | |
|
132 | 132 | For now we just have one official branch ("default") and will keep it so stable |
|
133 | 133 | that it can be (and is) used in production. Experimental changes should live |
|
134 | 134 | elsewhere (for example in a pull request) until they are ready. |
|
135 | 135 | |
|
136 | 136 | .. _translations: |
|
137 | 137 | .. include:: ./../kallithea/i18n/how_to |
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | "Roadmap" |
|
141 | 141 | --------- |
|
142 | 142 | |
|
143 | 143 | We do not have a road map but are waiting for your contributions. Refer to the |
|
144 | 144 | wiki_ for some ideas of places we might want to go -- contributions in these |
|
145 | 145 | areas are very welcome. |
|
146 | 146 | |
|
147 | 147 | |
|
148 | 148 | Thank you for your contribution! |
|
149 | 149 | -------------------------------- |
|
150 | 150 | |
|
151 | 151 | |
|
152 | 152 | .. _Weblate: http://weblate.org/ |
|
153 | 153 | .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open |
|
154 | 154 | .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests |
|
155 | 155 | .. _bitbucket: http://bitbucket.org/ |
|
156 | 156 | .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
157 | 157 | .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
158 | 158 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ |
|
159 | 159 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
@@ -1,200 +1,200 b'' | |||
|
1 | 1 | .. _installation: |
|
2 | 2 | |
|
3 | 3 | ========================== |
|
4 | 4 | Installation on Unix/Linux |
|
5 | 5 | ========================== |
|
6 | 6 | |
|
7 | 7 | The following describes three different ways of installing Kallithea: |
|
8 | 8 | |
|
9 | 9 | - :ref:`installation-source`: The simplest way to keep the installation |
|
10 | 10 | up-to-date and track any local customizations is to run directly from |
|
11 | 11 | source in a Kallithea repository clone, preferably inside a virtualenv |
|
12 | 12 | virtual Python environment. |
|
13 | 13 | |
|
14 | 14 | - :ref:`installation-virtualenv`: If you prefer to only use released versions |
|
15 | 15 | of Kallithea, the recommended method is to install Kallithea in a virtual |
|
16 | 16 | Python environment using `virtualenv`. The advantages of this method over |
|
17 | 17 | direct installation is that Kallithea and its dependencies are completely |
|
18 | 18 | contained inside the virtualenv (which also means you can have multiple |
|
19 | 19 | installations side by side or remove it entirely by just removing the |
|
20 | 20 | virtualenv directory) and does not require root privileges. |
|
21 | 21 | |
|
22 | 22 | - :ref:`installation-without-virtualenv`: The alternative method of installing |
|
23 | 23 | a Kallithea release is using standard pip. The package will be installed in |
|
24 | 24 | the same location as all other Python packages you have ever installed. As a |
|
25 | 25 | result, removing it is not as straightforward as with a virtualenv, as you'd |
|
26 | 26 | have to remove its dependencies manually and make sure that they are not |
|
27 | 27 | needed by other packages. |
|
28 | 28 | |
|
29 | 29 | .. _installation-source: |
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | Installation from repository source |
|
33 | 33 | ----------------------------------- |
|
34 | 34 | |
|
35 | 35 | To install Kallithea in a virtualenv_ using the stable branch of the development |
|
36 | 36 | repository, follow the instructions below:: |
|
37 | 37 | |
|
38 | 38 | hg clone https://kallithea-scm.org/repos/kallithea -u stable |
|
39 | 39 | cd kallithea |
|
40 | 40 | virtualenv ../kallithea-venv |
|
41 | 41 | source ../kallithea-venv/bin/activate |
|
42 | python setup.py develop | |
|
43 | python setup.py compile_catalog # for translation of the UI | |
|
42 | python2 setup.py develop | |
|
43 | python2 setup.py compile_catalog # for translation of the UI | |
|
44 | 44 | |
|
45 | 45 | You can now proceed to :ref:`setup`. |
|
46 | 46 | |
|
47 | 47 | To upgrade, simply update the repository with ``hg pull -u`` and restart the |
|
48 | 48 | server. |
|
49 | 49 | |
|
50 | 50 | .. _installation-virtualenv: |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | Installing a released version in a virtualenv |
|
54 | 54 | --------------------------------------------- |
|
55 | 55 | |
|
56 | 56 | It is highly recommended to use a separate virtualenv_ for installing Kallithea. |
|
57 | 57 | This way, all libraries required by Kallithea will be installed separately from your |
|
58 | 58 | main Python installation and other applications and things will be less |
|
59 | 59 | problematic when upgrading the system or Kallithea. |
|
60 | 60 | An additional benefit of virtualenv_ is that it doesn't require root privileges. |
|
61 | 61 | |
|
62 | 62 | - Assuming you have installed virtualenv_, create a new virtual environment |
|
63 | 63 | for example, in `/srv/kallithea/venv`, using the virtualenv command:: |
|
64 | 64 | |
|
65 | 65 | virtualenv /srv/kallithea/venv |
|
66 | 66 | |
|
67 | 67 | - Activate the virtualenv_ in your current shell session by running:: |
|
68 | 68 | |
|
69 | 69 | source /srv/kallithea/venv/bin/activate |
|
70 | 70 | |
|
71 | 71 | .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it |
|
72 | 72 | will "activate" a shell that terminates immediately. It is also perfectly |
|
73 | 73 | acceptable (and desirable) to create a virtualenv as a normal user. |
|
74 | 74 | |
|
75 | 75 | - Make a folder for Kallithea data files, and configuration somewhere on the |
|
76 | 76 | filesystem. For example:: |
|
77 | 77 | |
|
78 | 78 | mkdir /srv/kallithea |
|
79 | 79 | |
|
80 | 80 | - Go into the created directory and run this command to install Kallithea:: |
|
81 | 81 | |
|
82 | 82 | pip install kallithea |
|
83 | 83 | |
|
84 | 84 | Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea, |
|
85 | 85 | extract it and run:: |
|
86 | 86 | |
|
87 | python setup.py install | |
|
87 | python2 setup.py install | |
|
88 | 88 | |
|
89 | 89 | - This will install Kallithea together with pylons_ and all other required |
|
90 | 90 | python libraries into the activated virtualenv. |
|
91 | 91 | |
|
92 | 92 | You can now proceed to :ref:`setup`. |
|
93 | 93 | |
|
94 | 94 | .. _installation-without-virtualenv: |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | Installing a released version without virtualenv |
|
98 | 98 | ------------------------------------------------ |
|
99 | 99 | |
|
100 | 100 | For installation without virtualenv, 'just' use:: |
|
101 | 101 | |
|
102 | 102 | pip install kallithea |
|
103 | 103 | |
|
104 | 104 | Note that this method requires root privileges and will install packages |
|
105 | 105 | globally without using the system's package manager. |
|
106 | 106 | |
|
107 | 107 | To install as a regular user in ``~/.local``, you can use:: |
|
108 | 108 | |
|
109 | 109 | pip install --user kallithea |
|
110 | 110 | |
|
111 | 111 | You can now proceed to :ref:`setup`. |
|
112 | 112 | |
|
113 | 113 | |
|
114 | 114 | Upgrading Kallithea from Python Package Index (PyPI) |
|
115 | 115 | ---------------------------------------------------- |
|
116 | 116 | |
|
117 | 117 | .. note:: |
|
118 | 118 | It is strongly recommended that you **always** perform a database and |
|
119 | 119 | configuration backup before doing an upgrade. |
|
120 | 120 | |
|
121 | 121 | These directions will use '{version}' to note that this is the version of |
|
122 | 122 | Kallithea that these files were used with. If backing up your Kallithea |
|
123 | 123 | instance from version 0.1 to 0.2, the ``my.ini`` file could be |
|
124 | 124 | backed up to ``my.ini.0-1``. |
|
125 | 125 | |
|
126 | 126 | If using a SQLite database, stop the Kallithea process/daemon/service, and |
|
127 | 127 | then make a copy of the database file:: |
|
128 | 128 | |
|
129 | 129 | service kallithea stop |
|
130 | 130 | cp kallithea.db kallithea.db.{version} |
|
131 | 131 | |
|
132 | 132 | Back up your configuration file:: |
|
133 | 133 | |
|
134 | 134 | cp my.ini my.ini.{version} |
|
135 | 135 | |
|
136 | 136 | Ensure that you are using the Python virtual environment that you originally |
|
137 | 137 | installed Kallithea in by running:: |
|
138 | 138 | |
|
139 | 139 | pip freeze |
|
140 | 140 | |
|
141 | 141 | This will list all packages installed in the current environment. If |
|
142 | 142 | Kallithea isn't listed, activate the correct virtual environment:: |
|
143 | 143 | |
|
144 | 144 | source /srv/kallithea/venv/bin/activate |
|
145 | 145 | |
|
146 | 146 | Once you have verified the environment you can upgrade Kallithea with:: |
|
147 | 147 | |
|
148 | 148 | pip install --upgrade kallithea |
|
149 | 149 | |
|
150 | 150 | Then run the following command from the installation directory:: |
|
151 | 151 | |
|
152 | 152 | paster make-config Kallithea my.ini |
|
153 | 153 | |
|
154 | 154 | This will display any changes made by the new version of Kallithea to your |
|
155 | 155 | current configuration. It will try to perform an automerge. It is recommended |
|
156 | 156 | that you recheck the content after the automerge. |
|
157 | 157 | |
|
158 | 158 | .. note:: |
|
159 | 159 | Please always make sure your .ini files are up to date. Errors can |
|
160 | 160 | often be caused by missing parameters added in new versions. |
|
161 | 161 | |
|
162 | 162 | It is also recommended that you rebuild the whoosh index after upgrading since |
|
163 | 163 | the new whoosh version could introduce some incompatible index changes. Please |
|
164 | 164 | read the changelog to see if there were any changes to whoosh. |
|
165 | 165 | |
|
166 | 166 | The final step is to upgrade the database. To do this simply run:: |
|
167 | 167 | |
|
168 | 168 | paster upgrade-db my.ini |
|
169 | 169 | |
|
170 | 170 | This will upgrade the schema and update some of the defaults in the database, |
|
171 | 171 | and will always recheck the settings of the application, if there are no new |
|
172 | 172 | options that need to be set. |
|
173 | 173 | |
|
174 | 174 | .. note:: |
|
175 | 175 | The DB schema upgrade library has some limitations and can sometimes fail if you try to |
|
176 | 176 | upgrade from older major releases. In such a case simply run upgrades sequentially, e.g., |
|
177 | 177 | upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X |
|
178 | 178 | You can always specify what version of Kallithea you want to install for example in pip |
|
179 | 179 | `pip install Kallithea==0.2` |
|
180 | 180 | |
|
181 | 181 | You may find it helpful to clear out your log file so that new errors are |
|
182 | 182 | readily apparent:: |
|
183 | 183 | |
|
184 | 184 | echo > kallithea.log |
|
185 | 185 | |
|
186 | 186 | Once that is complete, you may now start your upgraded Kallithea Instance:: |
|
187 | 187 | |
|
188 | 188 | service kallithea start |
|
189 | 189 | |
|
190 | 190 | Or:: |
|
191 | 191 | |
|
192 | 192 | paster serve /srv/kallithea/my.ini |
|
193 | 193 | |
|
194 | 194 | .. note:: |
|
195 | 195 | If you're using Celery, make sure you restart all instances of it after |
|
196 | 196 | upgrade. |
|
197 | 197 | |
|
198 | 198 | |
|
199 | 199 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
200 | 200 | .. _pylons: http://www.pylonsproject.org/ |
@@ -1,110 +1,110 b'' | |||
|
1 | 1 | .. _installation_iis: |
|
2 | 2 | |
|
3 | 3 | ===================================================================== |
|
4 | 4 | Installing Kallithea on Microsoft Internet Information Services (IIS) |
|
5 | 5 | ===================================================================== |
|
6 | 6 | |
|
7 | 7 | The following is documented using IIS 7/8 terminology. There should be nothing |
|
8 | 8 | preventing you from applying this on IIS 6 well. |
|
9 | 9 | |
|
10 | 10 | .. note:: |
|
11 | 11 | |
|
12 | 12 | For the best security, it is strongly recommended to only host the site over |
|
13 | 13 | a secure connection, e.g. using TLS. |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | Prerequisites |
|
17 | 17 | ------------- |
|
18 | 18 | |
|
19 | 19 | Apart from the normal requirements for Kallithea, it is also necessary to get an |
|
20 | 20 | ISAPI-WSGI bridge module, e.g. isapi-wsgi. |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | Installation |
|
24 | 24 | ------------ |
|
25 | 25 | |
|
26 | 26 | The following assumes that your Kallithea is at ``c:\inetpub\kallithea``, and |
|
27 | 27 | will be served from the root of its own website. The changes to serve it in its |
|
28 | 28 | own virtual folder will be noted where appropriate. |
|
29 | 29 | |
|
30 | 30 | Application pool |
|
31 | 31 | ................ |
|
32 | 32 | |
|
33 | 33 | Make sure that there is a unique application pool for the Kallithea application |
|
34 | 34 | with an identity that has read access to the Kallithea distribution. |
|
35 | 35 | |
|
36 | 36 | The application pool does not need to be able to run any managed code. If you |
|
37 | 37 | are using a 32-bit Python installation, then you must enable 32-bit program in |
|
38 | 38 | the advanced settings for the application pool; otherwise Python will not be able |
|
39 | 39 | to run on the website and neither will Kallithea. |
|
40 | 40 | |
|
41 | 41 | .. note:: |
|
42 | 42 | |
|
43 | 43 | The application pool can be the same as an existing application pool, |
|
44 | 44 | as long as the Kallithea requirements are met by the existing pool. |
|
45 | 45 | |
|
46 | 46 | ISAPI handler |
|
47 | 47 | ............. |
|
48 | 48 | |
|
49 | 49 | The ISAPI handler can be generated using:: |
|
50 | 50 | |
|
51 | 51 | paster install-iis my.ini --root=/ |
|
52 | 52 | |
|
53 | 53 | This will generate a ``dispatch.py`` file in the current directory that contains |
|
54 | 54 | the necessary components to finalize an installation into IIS. Once this file |
|
55 | 55 | has been generated, it is necessary to run the following command due to the way |
|
56 | 56 | that ISAPI-WSGI is made:: |
|
57 | 57 | |
|
58 | python dispatch.py install | |
|
58 | python2 dispatch.py install | |
|
59 | 59 | |
|
60 | 60 | This accomplishes two things: generating an ISAPI compliant DLL file, |
|
61 | 61 | ``_dispatch.dll``, and installing a script map handler into IIS for the |
|
62 | 62 | ``--root`` specified above pointing to ``_dispatch.dll``. |
|
63 | 63 | |
|
64 | 64 | The ISAPI handler is registered to all file extensions, so it will automatically |
|
65 | 65 | be the one handling all requests to the specified root. When the website starts |
|
66 | 66 | the ISAPI handler, it will start a thread pool managed wrapper around the paster |
|
67 | 67 | middleware WSGI handler that Kallithea runs within and each HTTP request to the |
|
68 | 68 | site will be processed through this logic henceforth. |
|
69 | 69 | |
|
70 | 70 | Authentication with Kallithea using IIS authentication modules |
|
71 | 71 | .............................................................. |
|
72 | 72 | |
|
73 | 73 | The recommended way to handle authentication with Kallithea using IIS is to let |
|
74 | 74 | IIS handle all the authentication and just pass it to Kallithea. |
|
75 | 75 | |
|
76 | 76 | To move responsibility into IIS from Kallithea, we need to configure Kallithea |
|
77 | 77 | to let external systems handle authentication and then let Kallithea create the |
|
78 | 78 | user automatically. To do this, access the administration's authentication page |
|
79 | 79 | and enable the ``kallithea.lib.auth_modules.auth_container`` plugin. Once it is |
|
80 | 80 | added, enable it with the ``REMOTE_USER`` header and check *Clean username*. |
|
81 | 81 | Finally, save the changes on this page. |
|
82 | 82 | |
|
83 | 83 | Switch to the administration's permissions page and disable anonymous access, |
|
84 | 84 | otherwise Kallithea will not attempt to use the authenticated user name. By |
|
85 | 85 | default, Kallithea will populate the list of users lazily as they log in. Either |
|
86 | 86 | disable external auth account activation and ensure that you pre-populate the |
|
87 | 87 | user database with an external tool, or set it to *Automatic activation of |
|
88 | 88 | external account*. Finally, save the changes. |
|
89 | 89 | |
|
90 | 90 | The last necessary step is to enable the relevant authentication in IIS, e.g. |
|
91 | 91 | Windows authentication. |
|
92 | 92 | |
|
93 | 93 | |
|
94 | 94 | Troubleshooting |
|
95 | 95 | --------------- |
|
96 | 96 | |
|
97 | 97 | Typically, any issues in this setup will either be entirely in IIS or entirely |
|
98 | 98 | in Kallithea (or Kallithea's WSGI/paster middleware). Consequently, two |
|
99 | 99 | different options for finding issues exist: IIS' failed request tracking which |
|
100 | 100 | is great at finding issues until they exist inside Kallithea, at which point the |
|
101 | 101 | ISAPI-WSGI wrapper above uses ``win32traceutil``, which is part of ``pywin32``. |
|
102 | 102 | |
|
103 | 103 | In order to dump output from WSGI using ``win32traceutil`` it is sufficient to |
|
104 | 104 | type the following in a console window:: |
|
105 | 105 | |
|
106 | python -m win32traceutil | |
|
106 | python2 -m win32traceutil | |
|
107 | 107 | |
|
108 | 108 | and any exceptions occurring in the WSGI layer and below (i.e. in the Kallithea |
|
109 | 109 | application itself) that are uncaught, will be printed here complete with stack |
|
110 | 110 | traces, making it a lot easier to identify issues. |
@@ -1,244 +1,244 b'' | |||
|
1 | 1 | .. _installation_win: |
|
2 | 2 | |
|
3 | 3 | ================================================================ |
|
4 | 4 | Installation and upgrade on Windows (7/Server 2008 R2 and newer) |
|
5 | 5 | ================================================================ |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | First time install |
|
9 | 9 | :::::::::::::::::: |
|
10 | 10 | |
|
11 | 11 | Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer |
|
12 | 12 | |
|
13 | 13 | Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012 |
|
14 | 14 | |
|
15 | 15 | To install on an older version of Windows, see `<installation_win_old.html>`_ |
|
16 | 16 | |
|
17 | 17 | Step 1 -- Install Python |
|
18 | 18 | ------------------------ |
|
19 | 19 | |
|
20 | 20 | Install Python 2.x.y (x = 6 or 7). Latest version is recommended. If you need another version, they can run side by side. |
|
21 | 21 | |
|
22 | 22 | .. warning:: Python 3.x is not supported. |
|
23 | 23 | |
|
24 | 24 | - Download Python 2.x.y from http://www.python.org/download/ |
|
25 | 25 | - Choose and click on the version |
|
26 | 26 | - Click on "Windows X86-64 Installer" for x64 or "Windows x86 MSI installer" for Win32. |
|
27 | 27 | - Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards. |
|
28 | 28 | |
|
29 | 29 | While writing this guide, the latest version was v2.7.9. |
|
30 | 30 | Remember the specific major and minor versions installed, because they will |
|
31 | 31 | be needed in the next step. In this case, it is "2.7". |
|
32 | 32 | |
|
33 | 33 | Step 2 -- Python BIN |
|
34 | 34 | -------------------- |
|
35 | 35 | |
|
36 | 36 | Add Python BIN folder to the path. This can be done manually (editing |
|
37 | 37 | "PATH" environment variable) or by using Windows Support Tools that |
|
38 | 38 | come pre-installed in Windows Vista/7 and later. |
|
39 | 39 | |
|
40 | 40 | Open a CMD and type:: |
|
41 | 41 | |
|
42 | 42 | SETX PATH "%PATH%;[your-python-path]" /M |
|
43 | 43 | |
|
44 | 44 | Please substitute [your-python-path] with your Python installation |
|
45 | 45 | path. Typically this is ``C:\\Python27``. |
|
46 | 46 | |
|
47 | 47 | Step 3 -- Install pywin32 extensions |
|
48 | 48 | ------------------------------------ |
|
49 | 49 | |
|
50 | 50 | Download pywin32 from: |
|
51 | 51 | http://sourceforge.net/projects/pywin32/files/ |
|
52 | 52 | |
|
53 | 53 | - Click on "pywin32" folder |
|
54 | 54 | - Click on the first folder (in this case, Build 219, maybe newer when you try) |
|
55 | 55 | - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe" |
|
56 | 56 | for Win32) where x is the minor version of Python you installed. |
|
57 | 57 | When writing this guide, the file was: |
|
58 | 58 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download |
|
59 | 59 | (x64) |
|
60 | 60 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download |
|
61 | 61 | (Win32) |
|
62 | 62 | |
|
63 | 63 | Step 4 -- Install pip |
|
64 | 64 | --------------------- |
|
65 | 65 | |
|
66 | 66 | pip is a package management system for Python. You will need it to install Kallithea and its dependencies. |
|
67 | 67 | |
|
68 | 68 | If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC). |
|
69 | 69 | |
|
70 | 70 | If it was not installed or if you are using Python>=2.6,<2.7.9: |
|
71 | 71 | |
|
72 | 72 | - Go to https://bootstrap.pypa.io |
|
73 | 73 | - Right-click on get-pip.py and choose Saves as... |
|
74 | - Run "python get-pip.py" in the folder where you downloaded get-pip.py (may require admin access). | |
|
74 | - Run "python2 get-pip.py" in the folder where you downloaded get-pip.py (may require admin access). | |
|
75 | 75 | |
|
76 | 76 | .. note:: |
|
77 | 77 | |
|
78 | 78 | See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows |
|
79 | 79 | for details and alternative methods. |
|
80 | 80 | |
|
81 | 81 | Note that pip.exe will be placed inside your Python installation's |
|
82 | 82 | Scripts folder, which is likely not on your path. To correct this, |
|
83 | 83 | open a CMD and type:: |
|
84 | 84 | |
|
85 | 85 | SETX PATH "%PATH%;[your-python-path]\Scripts" /M |
|
86 | 86 | |
|
87 | 87 | Step 5 -- Kallithea folder structure |
|
88 | 88 | ------------------------------------ |
|
89 | 89 | |
|
90 | 90 | Create a Kallithea folder structure. |
|
91 | 91 | |
|
92 | 92 | This is only an example to install Kallithea. Of course, you can |
|
93 | 93 | change it. However, this guide will follow the proposed structure, so |
|
94 | 94 | please later adapt the paths if you change them. Folders without |
|
95 | 95 | spaces are recommended. |
|
96 | 96 | |
|
97 | 97 | Create the following folder structure:: |
|
98 | 98 | |
|
99 | 99 | C:\Kallithea |
|
100 | 100 | C:\Kallithea\Bin |
|
101 | 101 | C:\Kallithea\Env |
|
102 | 102 | C:\Kallithea\Repos |
|
103 | 103 | |
|
104 | 104 | Step 6 -- Install virtualenv |
|
105 | 105 | ---------------------------- |
|
106 | 106 | |
|
107 | 107 | .. note:: |
|
108 | 108 | A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea. |
|
109 | 109 | It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa. |
|
110 | 110 | |
|
111 | 111 | In a command prompt type:: |
|
112 | 112 | |
|
113 | 113 | pip install virtualenv |
|
114 | 114 | |
|
115 | 115 | Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar). |
|
116 | 116 | |
|
117 | 117 | To create a virtual environment, run:: |
|
118 | 118 | |
|
119 | 119 | virtualenv C:\Kallithea\Env |
|
120 | 120 | |
|
121 | 121 | Step 7 -- Install Kallithea |
|
122 | 122 | --------------------------- |
|
123 | 123 | |
|
124 | 124 | In order to install Kallithea, you need to be able to run "pip install kallithea". It will use pip to install the Kallithea Python package and its dependencies. |
|
125 | 125 | Some Python packages use managed code and need to be compiled. |
|
126 | 126 | This can be done on Linux without any special steps. On Windows, you will need to install Microsoft Visual C++ compiler for Python 2.7. |
|
127 | 127 | |
|
128 | 128 | Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27 |
|
129 | 129 | |
|
130 | 130 | .. note:: |
|
131 | 131 | You can also install the dependencies using already compiled Windows binaries packages. A good source of compiled Python packages is http://www.lfd.uci.edu/~gohlke/pythonlibs/. However, not all of the necessary packages for Kallithea are on this site and some are hard to find, so we will stick with using the compiler. |
|
132 | 132 | |
|
133 | 133 | In a command prompt type (adapting paths if necessary):: |
|
134 | 134 | |
|
135 | 135 | cd C:\Kallithea\Env\Scripts |
|
136 | 136 | activate |
|
137 | 137 | |
|
138 | 138 | The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar |
|
139 | 139 | (depending of your folder structure). Then type:: |
|
140 | 140 | |
|
141 | 141 | pip install kallithea |
|
142 | 142 | |
|
143 | 143 | .. note:: This will take some time. Please wait patiently until it is fully |
|
144 | 144 | complete. Some warnings will appear. Don't worry, they are |
|
145 | 145 | normal. |
|
146 | 146 | |
|
147 | 147 | Step 8 -- Install git (optional) |
|
148 | 148 | -------------------------------- |
|
149 | 149 | |
|
150 | 150 | Mercurial being a python package, it was installed automatically when doing "pip install kallithea". |
|
151 | 151 | |
|
152 | 152 | You need to install git manually if you want Kallithea to be able to host git repositories. |
|
153 | 153 | |
|
154 | 154 | See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions. |
|
155 | 155 | |
|
156 | 156 | Step 9 -- Configuring Kallithea |
|
157 | 157 | ------------------------------- |
|
158 | 158 | |
|
159 | 159 | Steps taken from `<setup.html>`_ |
|
160 | 160 | |
|
161 | 161 | You have to use the same command prompt as in Step 7, so if you closed |
|
162 | 162 | it, reopen it following the same commands (including the "activate" |
|
163 | 163 | one). When ready, type:: |
|
164 | 164 | |
|
165 | 165 | cd C:\Kallithea\Bin |
|
166 | 166 | paster make-config Kallithea production.ini |
|
167 | 167 | |
|
168 | 168 | Then you must edit production.ini to fit your needs (IP address, IP |
|
169 | 169 | port, mail settings, database, etc.). `NotePad++`__ or a similar text |
|
170 | 170 | editor is recommended to properly handle the newline character |
|
171 | 171 | differences between Unix and Windows. |
|
172 | 172 | |
|
173 | 173 | __ http://notepad-plus-plus.org/ |
|
174 | 174 | |
|
175 | 175 | For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type:: |
|
176 | 176 | |
|
177 | 177 | paster setup-db production.ini |
|
178 | 178 | |
|
179 | 179 | .. warning:: This time a *new* database will be installed. You must |
|
180 | 180 | follow a different step to later *upgrade* to a newer |
|
181 | 181 | Kallithea version) |
|
182 | 182 | |
|
183 | 183 | The script will ask you for confirmation about creating a new database, answer yes (y) |
|
184 | 184 | |
|
185 | 185 | The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar). |
|
186 | 186 | |
|
187 | 187 | The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want) |
|
188 | 188 | |
|
189 | 189 | The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want). |
|
190 | 190 | |
|
191 | 191 | If you make a mistake and the script doesn't end, don't worry: start it again. |
|
192 | 192 | |
|
193 | 193 | If you decided not to install git, you will get errors about it that you can ignore. |
|
194 | 194 | |
|
195 | 195 | Step 10 -- Running Kallithea |
|
196 | 196 | ---------------------------- |
|
197 | 197 | |
|
198 | 198 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type:: |
|
199 | 199 | |
|
200 | 200 | paster serve production.ini |
|
201 | 201 | |
|
202 | 202 | Open your web server, and go to http://127.0.0.1:5000 |
|
203 | 203 | |
|
204 | 204 | It works!! :-) |
|
205 | 205 | |
|
206 | 206 | Remark: |
|
207 | 207 | If it does not work the first time, Ctrl-C the CMD process and start it again. Don't forget the "http://" in Internet Explorer. |
|
208 | 208 | |
|
209 | 209 | What this guide does not cover: |
|
210 | 210 | |
|
211 | 211 | - Installing Celery |
|
212 | 212 | - Running Kallithea as a Windows Service. You can investigate here: |
|
213 | 213 | |
|
214 | 214 | - http://pypi.python.org/pypi/wsgisvc |
|
215 | 215 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ |
|
216 | 216 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service |
|
217 | 217 | |
|
218 | 218 | - Using Apache. You can investigate here: |
|
219 | 219 | |
|
220 | 220 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 |
|
221 | 221 | |
|
222 | 222 | |
|
223 | 223 | Upgrading |
|
224 | 224 | ::::::::: |
|
225 | 225 | |
|
226 | 226 | Stop running Kallithea |
|
227 | 227 | Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type:: |
|
228 | 228 | |
|
229 | 229 | pip install kallithea --upgrade |
|
230 | 230 | cd \Kallithea\Bin |
|
231 | 231 | |
|
232 | 232 | Backup your production.ini file now. |
|
233 | 233 | |
|
234 | 234 | Then run:: |
|
235 | 235 | |
|
236 | 236 | paster make-config Kallithea production.ini |
|
237 | 237 | |
|
238 | 238 | Look for changes and update your production.ini accordingly. |
|
239 | 239 | |
|
240 | 240 | Next, update the database:: |
|
241 | 241 | |
|
242 | 242 | paster upgrade-db production.ini |
|
243 | 243 | |
|
244 | 244 | More details can be found in `<upgrade.html>`_. |
@@ -1,281 +1,281 b'' | |||
|
1 | 1 | .. _installation_win_old: |
|
2 | 2 | |
|
3 | 3 | ====================================================================== |
|
4 | 4 | Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008) |
|
5 | 5 | ====================================================================== |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | First-time install |
|
9 | 9 | :::::::::::::::::: |
|
10 | 10 | |
|
11 | 11 | Target OS: Windows XP SP3 32-bit English (Clean installation) |
|
12 | 12 | + All Windows Updates until 24-may-2012 |
|
13 | 13 | |
|
14 | 14 | .. note:: |
|
15 | 15 | |
|
16 | 16 | This installation is for 32-bit systems, for 64-bit Windows you might need |
|
17 | 17 | to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions) |
|
18 | 18 | plus some extra tweaks. |
|
19 | 19 | These extra steps haven been marked as "64-bit". |
|
20 | 20 | Tested on Windows Server 2008 R2 SP1, 9-feb-2013. |
|
21 | 21 | If you run into any 64-bit related problems, please check these pages: |
|
22 | 22 | |
|
23 | 23 | - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ |
|
24 | 24 | - http://bugs.python.org/issue7511 |
|
25 | 25 | |
|
26 | 26 | Step 1 -- Install Visual Studio 2008 Express |
|
27 | 27 | -------------------------------------------- |
|
28 | 28 | |
|
29 | 29 | Optional: You can also install MinGW, but VS2008 installation is easier. |
|
30 | 30 | |
|
31 | 31 | Download "Visual C++ 2008 Express Edition with SP1" from: |
|
32 | 32 | http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso |
|
33 | 33 | (if not found or relocated, google for "visual studio 2008 express" for updated link. This link was taken from http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead) |
|
34 | 34 | |
|
35 | 35 | You can also download full ISO file for offline installation, just |
|
36 | 36 | choose "All -- Offline Install ISO image file" in the previous page and |
|
37 | 37 | choose "Visual C++ 2008 Express" when installing. |
|
38 | 38 | |
|
39 | 39 | .. note:: |
|
40 | 40 | |
|
41 | 41 | Using other versions of Visual Studio will lead to random crashes. |
|
42 | 42 | You must use Visual Studio 2008!" |
|
43 | 43 | |
|
44 | 44 | .. note:: |
|
45 | 45 | |
|
46 | 46 | Silverlight Runtime and SQL Server 2008 Express Edition are not |
|
47 | 47 | required, you can uncheck them |
|
48 | 48 | |
|
49 | 49 | .. note:: |
|
50 | 50 | |
|
51 | 51 | 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work). |
|
52 | 52 | Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138 |
|
53 | 53 | |
|
54 | 54 | .. note:: |
|
55 | 55 | |
|
56 | 56 | 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work. |
|
57 | 57 | I am not sure why this is not necessary for 32-bit. |
|
58 | 58 | Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat |
|
59 | 59 | |
|
60 | 60 | Step 2 -- Install Python |
|
61 | 61 | ------------------------ |
|
62 | 62 | |
|
63 | 63 | Install Python 2.x.y (x = 6 or 7) x86 version (32-bit). DO NOT USE A 3.x version. |
|
64 | 64 | Download Python 2.x.y from: |
|
65 | 65 | http://www.python.org/download/ |
|
66 | 66 | |
|
67 | 67 | Choose "Windows Installer" (32-bit version) not "Windows X86-64 |
|
68 | 68 | Installer". While writing this guide, the latest version was v2.7.3. |
|
69 | 69 | Remember the specific major and minor version installed, because it will |
|
70 | 70 | be needed in the next step. In this case, it is "2.7". |
|
71 | 71 | |
|
72 | 72 | .. note:: |
|
73 | 73 | |
|
74 | 74 | 64-bit: Just download and install the 64-bit version of python. |
|
75 | 75 | |
|
76 | 76 | Step 3 -- Install Win32py extensions |
|
77 | 77 | ------------------------------------ |
|
78 | 78 | |
|
79 | 79 | Download pywin32 from: |
|
80 | 80 | http://sourceforge.net/projects/pywin32/files/ |
|
81 | 81 | |
|
82 | 82 | - Click on "pywin32" folder |
|
83 | 83 | - Click on the first folder (in this case, Build 217, maybe newer when you try) |
|
84 | 84 | - Choose the file ending with ".win32-py2.x.exe" -> x being the minor |
|
85 | 85 | version of Python you installed (in this case, 7) |
|
86 | 86 | When writing this guide, the file was: |
|
87 | 87 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download |
|
88 | 88 | |
|
89 | 89 | .. note:: |
|
90 | 90 | |
|
91 | 91 | 64-bit: Download and install the 64-bit version. |
|
92 | 92 | At the time of writing you can find this at: |
|
93 | 93 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download |
|
94 | 94 | |
|
95 | 95 | Step 4 -- Python BIN |
|
96 | 96 | -------------------- |
|
97 | 97 | |
|
98 | 98 | Add Python BIN folder to the path |
|
99 | 99 | |
|
100 | 100 | You have to add the Python folder to the path, you can do it manually |
|
101 | 101 | (editing "PATH" environment variable) or using Windows Support Tools |
|
102 | 102 | that came preinstalled in Vista/7 and can be installed in Windows XP. |
|
103 | 103 | |
|
104 | 104 | - Using support tools on WINDOWS XP: |
|
105 | 105 | If you use Windows XP you can install them using Windows XP CD and |
|
106 | 106 | navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI). |
|
107 | 107 | Afterwards, open a CMD and type:: |
|
108 | 108 | |
|
109 | 109 | SETX PATH "%PATH%;[your-python-path]" -M |
|
110 | 110 | |
|
111 | 111 | Close CMD (the path variable will be updated then) |
|
112 | 112 | |
|
113 | 113 | - Using support tools on WINDOWS Vista/7: |
|
114 | 114 | |
|
115 | 115 | Open a CMD and type:: |
|
116 | 116 | |
|
117 | 117 | SETX PATH "%PATH%;[your-python-path]" /M |
|
118 | 118 | |
|
119 | 119 | Please substitute [your-python-path] with your Python installation path. |
|
120 | 120 | Typically: C:\\Python27 |
|
121 | 121 | |
|
122 | 122 | Step 5 -- Kallithea folder structure |
|
123 | 123 | ------------------------------------ |
|
124 | 124 | |
|
125 | 125 | Create a Kallithea folder structure |
|
126 | 126 | |
|
127 | 127 | This is only a example to install Kallithea, you can of course change |
|
128 | 128 | it. However, this guide will follow the proposed structure, so please |
|
129 | 129 | later adapt the paths if you change them. My recommendation is to use |
|
130 | 130 | folders with NO SPACES. But you can try if you are brave... |
|
131 | 131 | |
|
132 | 132 | Create the following folder structure:: |
|
133 | 133 | |
|
134 | 134 | C:\Kallithea |
|
135 | 135 | C:\Kallithea\Bin |
|
136 | 136 | C:\Kallithea\Env |
|
137 | 137 | C:\Kallithea\Repos |
|
138 | 138 | |
|
139 | 139 | Step 6 -- Install virtualenv |
|
140 | 140 | ---------------------------- |
|
141 | 141 | |
|
142 | 142 | Install Virtual Env for Python |
|
143 | 143 | |
|
144 | 144 | Navigate to: http://www.virtualenv.org/en/latest/index.html#installation |
|
145 | 145 | Right click on "virtualenv.py" file and choose "Save link as...". |
|
146 | 146 | Download to C:\\Kallithea (or whatever you want) |
|
147 | 147 | (the file is located at |
|
148 | 148 | https://raw.github.com/pypa/virtualenv/master/virtualenv.py) |
|
149 | 149 | |
|
150 | 150 | Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To |
|
151 | 151 | do so, open a CMD (Python Path should be included in Step3), navigate |
|
152 | 152 | where you downloaded "virtualenv.py", and write:: |
|
153 | 153 | |
|
154 | python virtualenv.py C:\Kallithea\Env | |
|
154 | python2 virtualenv.py C:\Kallithea\Env | |
|
155 | 155 | |
|
156 | 156 | (--no-site-packages is now the default behaviour of virtualenv, no need |
|
157 | 157 | to include it) |
|
158 | 158 | |
|
159 | 159 | Step 7 -- Install Kallithea |
|
160 | 160 | --------------------------- |
|
161 | 161 | |
|
162 | 162 | Finally, install Kallithea |
|
163 | 163 | |
|
164 | 164 | Close previously opened command prompt/s, and open a Visual Studio 2008 |
|
165 | 165 | Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open |
|
166 | 166 | "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" -> |
|
167 | 167 | "Visual Studio 2008 Command Prompt" |
|
168 | 168 | |
|
169 | 169 | .. note:: |
|
170 | 170 | |
|
171 | 171 | 64-bit: For 64-bit you need to modify the shortcut that is used to start the |
|
172 | 172 | Visual Studio 2008 Command Prompt. Use right-mouse click to open properties. |
|
173 | 173 | |
|
174 | 174 | Change commandline from:: |
|
175 | 175 | |
|
176 | 176 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86 |
|
177 | 177 | |
|
178 | 178 | to:: |
|
179 | 179 | |
|
180 | 180 | %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64 |
|
181 | 181 | |
|
182 | 182 | In that CMD (loaded with VS2008 PATHs) type:: |
|
183 | 183 | |
|
184 | 184 | cd C:\Kallithea\Env\Scripts (or similar) |
|
185 | 185 | activate |
|
186 | 186 | |
|
187 | 187 | The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar |
|
188 | 188 | (depending of your folder structure). Then type:: |
|
189 | 189 | |
|
190 | 190 | pip install kallithea |
|
191 | 191 | |
|
192 | 192 | (long step, please wait until fully complete) |
|
193 | 193 | |
|
194 | 194 | Some warnings will appear, don't worry as they are normal. |
|
195 | 195 | |
|
196 | 196 | Step 8 -- Configuring Kallithea |
|
197 | 197 | ------------------------------- |
|
198 | 198 | |
|
199 | 199 | steps taken from http://packages.python.org/Kallithea/setup.html |
|
200 | 200 | |
|
201 | 201 | You have to use the same Visual Studio 2008 command prompt as Step7, so |
|
202 | 202 | if you closed it reopen it following the same commands (including the |
|
203 | 203 | "activate" one). When ready, just type:: |
|
204 | 204 | |
|
205 | 205 | cd C:\Kallithea\Bin |
|
206 | 206 | paster make-config Kallithea production.ini |
|
207 | 207 | |
|
208 | 208 | Then, you must edit production.ini to fit your needs (network address and |
|
209 | 209 | port, mail settings, database, whatever). I recommend using NotePad++ |
|
210 | 210 | (free) or similar text editor, as it handles well the EndOfLine |
|
211 | 211 | character differences between Unix and Windows |
|
212 | 212 | (http://notepad-plus-plus.org/) |
|
213 | 213 | |
|
214 | 214 | For the sake of simplicity lets run it with the default settings. After |
|
215 | 215 | your edits (if any), in the previous Command Prompt, type:: |
|
216 | 216 | |
|
217 | 217 | paster setup-db production.ini |
|
218 | 218 | |
|
219 | 219 | (this time a NEW database will be installed, you must follow a different |
|
220 | 220 | step to later UPGRADE to a newer Kallithea version) |
|
221 | 221 | |
|
222 | 222 | The script will ask you for confirmation about creating a NEW database, |
|
223 | 223 | answer yes (y) |
|
224 | 224 | The script will ask you for repository path, answer C:\\Kallithea\\Repos |
|
225 | 225 | (or similar) |
|
226 | 226 | The script will ask you for admin username and password, answer "admin" |
|
227 | 227 | + "123456" (or whatever you want) |
|
228 | 228 | The script will ask you for admin mail, answer "admin@xxxx.com" (or |
|
229 | 229 | whatever you want) |
|
230 | 230 | |
|
231 | 231 | If you make some mistake and the script does not end, don't worry, start |
|
232 | 232 | it again. |
|
233 | 233 | |
|
234 | 234 | Step 9 -- Running Kallithea |
|
235 | 235 | --------------------------- |
|
236 | 236 | |
|
237 | 237 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, |
|
238 | 238 | just type:: |
|
239 | 239 | |
|
240 | 240 | paster serve production.ini |
|
241 | 241 | |
|
242 | 242 | Open yout web server, and go to http://127.0.0.1:5000 |
|
243 | 243 | |
|
244 | 244 | It works!! :-) |
|
245 | 245 | |
|
246 | 246 | Remark: |
|
247 | 247 | If it does not work first time, just Ctrl-C the CMD process and start it |
|
248 | 248 | again. Don't forget the "http://" in Internet Explorer |
|
249 | 249 | |
|
250 | 250 | What this Guide does not cover: |
|
251 | 251 | |
|
252 | 252 | - Installing Celery |
|
253 | 253 | - Running Kallithea as Windows Service. You can investigate here: |
|
254 | 254 | |
|
255 | 255 | - http://pypi.python.org/pypi/wsgisvc |
|
256 | 256 | - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/ |
|
257 | 257 | - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service |
|
258 | 258 | |
|
259 | 259 | - Using Apache. You can investigate here: |
|
260 | 260 | |
|
261 | 261 | - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4 |
|
262 | 262 | |
|
263 | 263 | |
|
264 | 264 | Upgrading |
|
265 | 265 | ::::::::: |
|
266 | 266 | |
|
267 | 267 | Stop running Kallithea |
|
268 | 268 | Open a CommandPrompt like in Step7 (VS2008 path + activate) and type:: |
|
269 | 269 | |
|
270 | 270 | easy_install -U kallithea |
|
271 | 271 | cd \Kallithea\Bin |
|
272 | 272 | |
|
273 | 273 | { backup your production.ini file now} :: |
|
274 | 274 | |
|
275 | 275 | paster make-config Kallithea production.ini |
|
276 | 276 | |
|
277 | 277 | (check changes and update your production.ini accordingly) :: |
|
278 | 278 | |
|
279 | 279 | paster upgrade-db production.ini (update database) |
|
280 | 280 | |
|
281 | 281 | Full steps in http://packages.python.org/Kallithea/upgrade.html |
@@ -1,97 +1,97 b'' | |||
|
1 | 1 | ============ |
|
2 | 2 | Translations |
|
3 | 3 | ============ |
|
4 | 4 | |
|
5 | 5 | Translations are available on Hosted Weblate at the following URL: |
|
6 | 6 | |
|
7 | 7 | https://hosted.weblate.org/projects/kallithea/kallithea/ |
|
8 | 8 | |
|
9 | 9 | Registered users may contribute to the existing languages, or request a new |
|
10 | 10 | language translations. |
|
11 | 11 | |
|
12 | 12 | |
|
13 | 13 | Translating using Weblate |
|
14 | 14 | ------------------------- |
|
15 | 15 | |
|
16 | 16 | Weblate_ offers a simple and easy to use interface featuring glossary, machine |
|
17 | 17 | translation, suggestions based on similar translations in other projects, |
|
18 | 18 | automatic checks etc. Weblate imports the source code tree directly from |
|
19 | 19 | the version control system, and commits edits back from time to time. |
|
20 | 20 | |
|
21 | 21 | When registering at Weblate, make sure you name and email address you prefer to |
|
22 | 22 | be used when your changes are committed. We can and probably will amend changesets |
|
23 | 23 | coming from Weblate, but having things right from the beginning makes things easier. |
|
24 | 24 | |
|
25 | 25 | Weblate performs sanity checks all the time and tries to prevent you from ignoring |
|
26 | 26 | them. Most common mistakes are inconsistent punctuation, whitespaces, missing or extra |
|
27 | 27 | format parameters, untranslated strings copied into the translation. Please perform |
|
28 | 28 | necessary corrections when they're needed, or override the false positives. |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | Merging translations from Weblate |
|
32 | 32 | --------------------------------- |
|
33 | 33 | |
|
34 | 34 | Weblate rebases its changes every time it pulls from our repository. Pulls are triggered |
|
35 | 35 | by a web hook from Our Own Kallithea every time it receives new commits. Usually merging |
|
36 | 36 | the new translations is a straightforward process consisting of a pull from Weblate-hosted |
|
37 | 37 | repository which is available under Data Exports tab in Weblate interface. |
|
38 | 38 | |
|
39 | 39 | Weblate tries to minimise the number of commits, but that's not always work, especially |
|
40 | 40 | when two translators work with different languages at more or less the same time. |
|
41 | 41 | It makes sense sometimes to re-order or fold commits by the same author when they touch |
|
42 | 42 | just the same language translation. That, however, may confuse Weblate sometimes, in |
|
43 | 43 | which case it should be manually convinced it has to discard the commits it created by |
|
44 | 44 | using its administrative interface. |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | Manual creation of a new language translation |
|
48 | 48 | --------------------------------------------- |
|
49 | 49 | |
|
50 | 50 | In the prepared development environment, run the following to ensure |
|
51 | 51 | all translation strings are extracted and up-to-date:: |
|
52 | 52 | |
|
53 | python setup.py extract_messages | |
|
53 | python2 setup.py extract_messages | |
|
54 | 54 | |
|
55 | 55 | Create new language by executing following command:: |
|
56 | 56 | |
|
57 | python setup.py init_catalog -l <new_language_code> | |
|
57 | python2 setup.py init_catalog -l <new_language_code> | |
|
58 | 58 | |
|
59 | 59 | This creates a new translation under directory `kallithea/i18n/<new_language_code>` |
|
60 | 60 | based on the translation template file, `kallithea/i18n/kallithea.pot`. |
|
61 | 61 | |
|
62 | 62 | Edit the new PO file located in `LC_MESSAGES` directory with poedit or your |
|
63 | 63 | favorite PO files editor. After you finished with the translations, check the |
|
64 | 64 | translation file for errors by executing:: |
|
65 | 65 | |
|
66 | 66 | msgfmt -f -c kallithea/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po> |
|
67 | 67 | |
|
68 | 68 | Finally, compile the translations:: |
|
69 | 69 | |
|
70 | python setup.py compile_catalog -l <new_language_code> | |
|
70 | python2 setup.py compile_catalog -l <new_language_code> | |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | Updating translations |
|
74 | 74 | --------------------- |
|
75 | 75 | |
|
76 | 76 | Extract the latest versions of strings for translation by running:: |
|
77 | 77 | |
|
78 | python setup.py extract_messages | |
|
78 | python2 setup.py extract_messages | |
|
79 | 79 | |
|
80 | 80 | Update the PO file by doing:: |
|
81 | 81 | |
|
82 | python setup.py update_catalog -l <new_language_code> | |
|
82 | python2 setup.py update_catalog -l <new_language_code> | |
|
83 | 83 | |
|
84 | 84 | Edit the new updated translation file. Repeat all steps after `init_catalog` step from |
|
85 | 85 | new translation instructions |
|
86 | 86 | |
|
87 | 87 | |
|
88 | 88 | Testing translations |
|
89 | 89 | -------------------- |
|
90 | 90 | |
|
91 | 91 | Edit kallithea/tests/test.ini file and set lang attribute to:: |
|
92 | 92 | |
|
93 | 93 | lang=<new_language_code> |
|
94 | 94 | |
|
95 | 95 | Run Kallithea tests by executing:: |
|
96 | 96 | |
|
97 | 97 | nosetests |
General Comments 0
You need to be logged in to leave comments.
Login now