| 151 | ==== Check list ==== |
| 152 | |
| 153 | When there's some trouble using the Subversion bindings, |
| 154 | it usually help to perform the following checks: |
| 155 | |
| 156 | 1. Verify that you can load the bindings using the Python interactive interpreter |
| 157 | |
| 158 | {{{ |
| 159 | $ python |
| 160 | Python ... |
| 161 | >>> from svn import core |
| 162 | }}} |
| 163 | If this succeeds, that's a good start. |
| 164 | |
| 165 | If it doesn't, it usually means that your bindings are located in |
| 166 | a place they can't be loaded from. So either move the `svn` and `libsvn` |
| 167 | found in the /opt/subversion-xxx/lib/svn-python folder (or similar) |
| 168 | into your site-packages folder, or add the above folder to your PYTHON_PATH, |
| 169 | or create a [http://docs.python.org/lib/module-site.html svn.pth] file |
| 170 | in your Python site-packages folder with the above folder path as its |
| 171 | single line content. |
| 172 | |
| 173 | 2. Check the version |
| 174 | {{{ |
| 175 | >>> (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO, core.SVN_VER_PATCH) |
| 176 | (1, 4, 3, 3) |
| 177 | }}} |
| 178 | Verify that the version given back matches your expectation. |
| 179 | |
| 180 | 3. Check that you're using the right binaries (Linux) |
| 181 | |
| 182 | Get the pid of the above running Python interpreter (i.e. once the |
| 183 | binding is loaded), and get the list of the libraries used by looking at the |
| 184 | corresponding map file. |
| 185 | |
| 186 | e.g. |
| 187 | {{{ |
| 188 | cat /proc/10213/maps | grep .so | cut -d/ -f2- | sort -u |
| 189 | }}} |
| 190 | |
| 191 | In particular, pay attention to the `.../lib/svn-python/libsvn/_core.so` file |
| 192 | and see if it's location seems to be consistent with both those of the other |
| 193 | svn libraries (`.../lib/*.so`) and the location of the Python code part of the |
| 194 | bindings (`.../lib/svn-python/svn/core.py`). |
| 195 | |
| 196 | 3. If you're using Apache / mod_python (Linux) |
| 197 | |
| 198 | Get a similar list of libraries, but this time for one of your httpd process. |
| 199 | Then compare the two, and pay attention to any difference between the `svn` |
| 200 | libraries and the `apr` libraries. You ''have to'' have compatible APR libraries |
| 201 | between Apache and Subversion, otherwise you risk to get a wide variety of subtle |
| 202 | errors (e.g. #4985). |