Modify

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#11731 closed defect (fixed)

Check on Trac version in setup.py

Reported by: lgaifax Owned by: jun66j5
Priority: normal Component: TracPygit2Plugin
Severity: normal Keywords:
Cc: Trac Release:

Description

In the setup.py there is a check that prevent installation of the plugin if the Trac version is not higher than 0.12.

Since I usually install Trac instances with a buildout recipe, that check actually blocks the installation, since Trac may not be already there when the plugin gets installed.

Would it be possible to either remove the check, or at least postpone it when the plugin gets loaded by Trac?

Attachments (0)

Change History (5)

comment:1 Changed 7 months ago by jun66j5

In 13907:

TracPygit2Plugin: removed check the version of installed Trac in setup.py (refs #11731)

comment:2 Changed 7 months ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

I've removed the check. However, if some plugins use i18n feature by Babel, the plugins require installed Trac on the its build. Therefore, I think the recipe should allow to install the plugins.

comment:3 Changed 7 months ago by lgaifax

Thank you!

It's not clear to me what you mean: I do have i18n-aware plugins installed (one for all, AccountManagerPlugin), and everything run smooth, ie I correctly see the instance in my own language, italian. Do you have an example of a plugin that actually requires an already installed Trac package to allow its installation?

comment:4 Changed 7 months ago by jun66j5

Trac core provides get_l10n_cmdclass and get_l10n_js_cmdclass in source:tags/trac-0.12.5/trac/dist.py@:294-295,306,313#L291. The cmdclasss includes the following commands which are used in build stage of Trac core and plugins.

  • build: run compile_catalog and compile_catalog_js before build_py.
  • compile_catalog_js: compile catalog files for javascript i18n.
  • generate_messages_js: generate javascript i18n files from compiled catalog files.

Also i18n-aware plugins use one of the cmdclasss in setup.py, e.g. accountmanagerplugin/trunk/setup.py@12736:30-32#L12, tracdragdropplugin/0.12/setup.py@13613:16-17#L8.

comment:5 Changed 7 months ago by lgaifax

Oh, I see, thank you for the refs, they clarify the issue to me. These are mainly useful while developing though, to update existing .po files. My install procedure does its own compile of PO files to MO files itself anyway.

I do no see a clean way to pre-install a Trac package before executing the buildout recipe, other than going thru a virtualenv...

Add Comment

Modify Ticket

Action
as closed The owner will remain jun66j5.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.