Edgewall Software

Changes between Version 25 and Version 26 of TracDev/DevelopmentWithEclipseAndPyDev


Ignore:
Timestamp:
Apr 2, 2016, 6:40:12 AM (8 years ago)
Author:
figaro
Comment:

Further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/DevelopmentWithEclipseAndPyDev

    v25 v26  
    99 1. Install [http://www.eclipse.org Eclipse] (3.3 or newer will do).
    1010 1. Install the [http://pydev.org PyDev] plugin for Eclipse.
    11  1. Alternatively, install [[http://brainwy.github.io/liclipse|LiClipse]], it comes with !PyDev already integrated.
     11 1. Alternatively, install [http://www.liclipse.com/ LiClipse], it comes with !PyDev already integrated.
    1212 1. (Optional) Install either [http://subclipse.tigris.org Subclipse] or [http://www.eclipse.org/subversive/ Subversive] for Eclipse-integrated Subversion tools.
    1313 1. Create a new project in Eclipse that contains the sources for Trac.
     
    1515 1. Create an initial run configuration by clicking right on ''trac/web/standalone.py file'', and choosing ''Run As -> Python Run''. Trac will complain that no environment has been set.
    1616 1. Select ''Run -> Open Run Dialog...'' and set the correct command line arguments in the ''arguments'' tab, eg. ''--port 8000 /path/to/myproject''.
    17   * Note that the option --auto-reload will cause tracd to restart every time source code has been changed, but it seems to prevent debugging with !PyDev. This seems to have something to do with the way Trac reloads new instance as a child thread using "thread" library, which doesn't seem to be compatible with !PyDev debugging. Googling revealed some hints that instead using "thread"-module you should use "threading"-module (higherlevel).
    18   * Note that if your debugging doesn't work with a plugin, then remove the package from the install destination (eg. ''rm -Rf'') and soft link it from your source.
     17  * Note that the option --auto-reload will cause tracd to restart every time source code has been changed, but it seems to prevent debugging with !PyDev. This seems to have something to do with the way Trac reloads new instance as a child thread using "thread" library, which doesn't seem to be compatible with !PyDev debugging. Then, instead of using "thread"-module you should use "threading"-module (higherlevel).
     18  * Note that if your debugging doesn't work with a plugin, then remove the package from the install destination, eg `rm -Rf` and soft link it from your source.
    1919 1. You should now be able to run tracd, as well as to debug it using the same run configuration. To run the test cases, just click on a test folder and select ''Run -> Python unit tests''.
    2020
    2121== Automatic translation compilation
    2222
    23 If you want to setup automatic translation compilation do the following:
     23If you want to set up automatic translation compilation do the following:
    2424
    2525 1. Right click on Trac project and select ''Properties''. Select ''Builders''. Click ''New''. Select ''Program''.
     
    4949!PyLint is a validator and quality checker for the Python programming language. It can be integrated with !PyDev, see [http://pydev.org/manual_adv_pylint.html pydev.org] for details.
    5050
    51 For developing Trac plugins, you should reference to all dependent eggs (such as Tarc, Genshi, Babel, etc.). To do this open  `Project > Properties`, go to node `PyDev - PYTHONPATH` and click on `Add zip/jar/egg/` in tab `External Libraries`. Search for your `Trac-$VERSION-.egg` and do the same for all required libraries (Genshi, Babel).
     51For developing Trac plugins, you should reference to all dependent eggs, such as Trac, Genshi, Babel, etc. To do this open  `Project > Properties`, go to node `PyDev - PYTHONPATH` and click on `Add zip/jar/egg/` in tab `External Libraries`. Search for your `Trac-$VERSION-.egg` and do the same for all required libraries (Genshi, Babel).
    5252
    53 If you import from `pkg_resources` you need to add `#@UnresolvedImport` after it, because otherwise you get the error: `Unresolved import: resource_filename`. See [http://stackoverflow.com/questions/6336882/pylint-doesnt-like-pkg-resources-resource-filename stackoverflow-question] for details:
     53If you import from `pkg_resources` you need to add `#@UnresolvedImport` after it, because otherwise you get the error: `Unresolved import: resource_filename`. See [SO:6336882/pylint-doesnt-like-pkg-resources-resource-filename stackoverflow-question] for details:
    5454
    5555{{{#!py