Edgewall Software

Changes between Version 4 and Version 5 of TracModPython2.7


Ignore:
Timestamp:
Feb 22, 2015, 3:11:28 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython2.7

    v4 v5  
    1 = Trac and mod_python 2.7 =
     1= Trac and mod_python 2.7
    22
    33TracModPython setup is for Apache 2, but it may be possible to work with Apache 1.3.
    44
    5 == Installing mod_python ==
     5== Installing mod_python
    66
    77These instructions below have worked for:
     
    1010  * Trac 0.11dev-r6202
    1111
    12 First, make sure that the python in the {{{$PATH}}} is the python you want to use (you can revert it later):
     12First, make sure that the Python in the {{{$PATH}}} is the Python you want to use (you can revert it later):
     13
    1314{{{
    1415sudo mv /usr/bin/python /usr/bin/python.back
     
    1718
    1819Then download and build the [http://www.modpython.org/ mod_python] 2.7 module. Use the most recent 2.7 version, mine was 2.7.11:
     20
    1921{{{
    2022curl http://www.axint.net/apache/httpd/modpython/mod_python-2.7.11.tgz > mod_python-2.7.11.tgz
     
    2931   CFLAGS=$(OPT) $(INCLUDES)
    3032}}}
     33
    3134into:
     35
    3236{{{
    3337   CFLAGS=$(OPT) $(INCLUDES) -DEAPI
    3438}}}
    3539
    36 Then, do the build:
     40Then do the build:
     41
    3742{{{
    3843make clean
     
    4348{{{mod_python}}} is now installed.
    4449
    45 == Configurating and testing mod_python ==
     50== Configurating and testing mod_python
    4651
    4752You must add the following lines to your {{{httpd.conf}}}:
     53
    4854{{{
    4955    LoadModule python_module libexec/mod_python.so
    5056}}}
    51 (The actual path to mod_python.so may vary, but make install should report at the very end exactly where mod_python.so was placed and how the LoadModule directive should appear), and
     57
     58The actual path to `mod_python.so` may vary, but make install should report at the very end exactly where `mod_python.so` was placed and how the !LoadModule directive should appear, and
    5259{{{
    5360    AddModule mod_python.c
    5461}}}
    5562
    56 You can test that everything is OK using the instructions on http://www.modpython.org/live/mod_python-2.7.8/doc-html/inst-testing.html
     63You can test that everything is OK using the instructions on http://www.modpython.org/live/mod_python-2.7.8/doc-html/inst-testing.html.
     64Then, modify the settings for your Trac instance into:
    5765
    58 Then, modify the settings for your Trac instance into:
    5966{{{
    6067<Location /projects/myproject>
     
    6572</Location>
    6673}}}
    67 Of course, use your own values for {{{/projects/myproject}}} and {{{/var/trac/myproject}}}. {{{TracUriRoot}}} may not be necessary; if you remove it, you will need to modify the patch below.
     74
     75Of course, use your own values for {{{/projects/myproject}}} and {{{/var/trac/myproject}}}. {{{TracUriRoot}}} may not be necessary. If you remove it, you will need to modify the patch below.
    6876
    6977Restart Apache after each configuration change.
    7078
    71 == Patching Trac ==
     79== Patching Trac
    7280
    7381At this stage, opening http://localhost/projects/myproject in your browser will likely return an error 500. You can look in the {{{error_log}}} file: it is likely a Python exception, because the {{{trac.web.modpython_frontend}}} code tries to use APIs from mod_python that are different in 3.3.
     
    139147}}}
    140148
    141 == Known issues with these instructions ==
     149== Caveats
    142150
    143  * The patch removes a few functionalities (such as setting up the PYTHON_EGG_CACHE): if you need them, you will need to modify the patch.
    144 
    145  * There may be a character set issue (the non-ascii chars may not be working properly). It is probably easy to fix.
    146 
     151 * The patch removes a few functionalities, such as setting up the PYTHON_EGG_CACHE: if you need them, you will need to modify the patch.
     152 * There may be a character set issue: the non-ASCII chars may not be working properly. It is probably easy to fix.
    147153 * In my setup, the performance was not improved by moving to {{{mod_python}}}, but it is likely an issue with the database access.