138 | | There's no equivalent `trac-svn-hook.bat` for Windows yet, but the script can be run by Cygwin's bash. |
139 | | |
140 | | Follow the help in the documentation header of the script to configure `trac-svn-hook`. Configuring the hook environment variables is even easier in Subversion 1.8 and later using the [http://svnbook.red-bean.com/en/1.8/svn.reposadmin.create.html#svn.reposadmin.hooks.configuration hook script environment] configuration. Rather than directly editing `trac-svn-hook` to set the environment variables, they can be configured through the repository `conf/hooks-env` file. Replace the [trac:source:trunk/contrib/trac-svn-hook@:65-67#L61 configuration section] with: |
141 | | {{{#!sh |
142 | | export PATH=$PYTHON_BIN:$PATH |
143 | | export LD_LIBRARY_PATH=$PYTHON_LIB:$LD_LIBRARY_PATH |
144 | | }}} |
145 | | and set the variables `TRAC_ENV`, `PYTHON_BIN` and `PYTHON_LIB` in the `hooks-env` file. Here is an example, using a Python virtual environment at `/usr/local/venv`: |
| 138 | Follow the help in the documentation header of the script to configure `trac-svn-hook`. There's no equivalent `trac-svn-hook.bat` for Windows yet, but the script can be run by Cygwin's bash. The documentation header of `trac-svn-hook` contains a Cygwin configuration example. |
| 139 | |
| 140 | Configuring the hook environment variables is even easier in Subversion 1.8 and later using the [http://svnbook.red-bean.com/en/1.8/svn.reposadmin.create.html#svn.reposadmin.hooks.configuration hook script environment] configuration. Rather than directly editing `trac-svn-hook` to set the environment variables, they can be configured through the repository `conf/hooks-env` file. |
| 141 | |
| 142 | Here is an example, using a Python virtual environment at `/usr/local/venv`: |