Development Box Setup

20 views
Skip to first unread message

Florian Schricker

unread,
Nov 19, 2019, 9:25:23 AM11/19/19
to Trac Development
Hi,


I am interested in Trac development (plugins primarily) and thus searching for clues on how to best setup a development box and the workflow for actual development: How to best debug a plugin's javascript and/or python code?



Any help or pointers on what a good setup for Trac plugin development is would be highly appreciated,
kind regards,
Florian

RjOllos

unread,
Nov 19, 2019, 11:50:06 AM11/19/19
to Trac Development
On Tuesday, November 19, 2019 at 6:25:23 AM UTC-8, Florian Schricker wrote:
Hi,


I am interested in Trac development (plugins primarily) and thus searching for clues on how to best setup a development box and the workflow for actual development: How to best debug a plugin's javascript and/or python code?

For JavaScript, the browser dev tools have a good debugger.
Yes, I think the "Trac with Eclipse PyDev" has not been maintained as well, but it may still work.

Do you prefer using an IDE? I develop with TracStandalone and Vim / pdb these days.

RjOllos

unread,
Nov 19, 2019, 11:51:26 AM11/19/19
to Trac Development
If you make an attempt at setting up a dev environment, please do report any issues you encounter and we can improve the docs along the way. I'd like to reduce the pain points as much as possible and happy to have conversations about your experiences. 

- Ryan

Florian Schricker

unread,
Nov 20, 2019, 4:22:40 AM11/20/19
to Trac Development


Am Dienstag, 19. November 2019 17:50:06 UTC+1 schrieb RjOllos:

Yes, I think the "Trac with Eclipse PyDev" has not been maintained as well, but it may still work.

Do you prefer using an IDE? I develop with TracStandalone and Vim / pdb these days.

Well I am more the spoiled Windows / Visual Studio type of developer... I can use Vim to administer some tracd on some box but that's basically it.

I would go ahead and setup a Linux VM and install Eclipeand give it a go if at least the Wiki page is not totally off and give feedback. Which distro is preferred? The production system is running on CentOS but for "desktop / IDE" I'd rather choose Ubuntu. Any comments on that?

Maybe I'll also evaluate PyCharm at least briefly; it seems to be quite popular.

regards,
Florian

Ryan Ollos

unread,
Nov 20, 2019, 11:52:27 AM11/20/19
to trac...@googlegroups.com
On Wed, Nov 20, 2019 at 1:22 AM Florian Schricker <fschr...@gmail.com> wrote:


Am Dienstag, 19. November 2019 17:50:06 UTC+1 schrieb RjOllos:

Yes, I think the "Trac with Eclipse PyDev" has not been maintained as well, but it may still work.

Do you prefer using an IDE? I develop with TracStandalone and Vim / pdb these days.

Well I am more the spoiled Windows / Visual Studio type of developer... I can use Vim to administer some tracd on some box but that's basically it.

Windows is fine for development and you can development Trac using Visual Studio or VS Code. We'll just have to figure out how to setup the debugger, but it shouldn't be too difficult.
 
I would go ahead and setup a Linux VM and install Eclipeand give it a go if at least the Wiki page is not totally off and give feedback. Which distro is preferred? The production system is running on CentOS but for "desktop / IDE" I'd rather choose Ubuntu. Any comments on that?

I've used Ubuntu quite a bit for Trac development. Either Ubuntu or CentOS should be fine.
 
Maybe I'll also evaluate PyCharm at least briefly; it seems to be quite popular.

I've done development with PyCharm and used the debugger and it works well.

Screen Shot 2019-11-20 at 08.49.10.jpg

Screen Shot 2019-11-20 at 08.48.48.jpg

Screen Shot 2019-11-20 at 08.48.58.jpg

Screen Shot 2019-11-20 at 08.51.44.jpg
- Ryan 

Florian Schricker

unread,
Nov 22, 2019, 2:51:47 AM11/22/19
to Trac Development
Am Dienstag, 19. November 2019 17:51:26 UTC+1 schrieb RjOllos:
If you make an attempt at setting up a dev environment, please do report any issues you encounter and we can improve the docs along the way. I'd like to reduce the pain points as much as possible and happy to have conversations about your experiences. 

(I am not having that much time to get things going but here is the current status.)
  • Ubuntu 19.10 (Virtualbox VM) setup w/ no issues.
  • Eclipse for Java Developers 2019-09 R (4.13.0) (Ubuntu related issues, that snap package was freezing my VM; used binaries)
  • PyDev plugin installed within Eclipse using the "Software Site" URL http://www.pydev.org/updages
  • dev setup using TracDev/DevelopmentEnvironmentSetup; I have trac, genshi, jinja2 sources in one common root directory
  •  Eclipse
    •  project for trac created; needed to add gensi / jinja2 sources as "external libraries" in the project properties PYTHONPATH settings
    • running standalone.py w/o args from the Eclipse project gives me the usage info in the Eclipse console
What I was wondering now: I have no "normal" trac binaries installed on this box. How best to get a trac environment created? Is there a way to actually "build" trac-admin and use it from within trac-trunk as checked out from svn? Like Run trac/admin/console.py w/ apropriate args? Is it advisable to have a clean dev box w/ "system installed trac"?

regards,
Florian

RjOllos

unread,
Dec 2, 2019, 9:52:35 PM12/2/19
to Trac Development
You may want to create and activate a virtualenv, so that you can have multiple development environments and start over more easily.

Either way, you just run "python setup.py develop" from the Trac source and trac-admin will be put on the path, same as if you'd run "python setup.py install".

- Ryan 
Reply all
Reply to author
Forward
0 new messages