Sorry, my illustration was incorrect.

It should be still easy to make a replacement like this:

- MODULE_VERSION="4.2"
+ from gramps.version import major_version

-plg.gramps_target_version = MODULE_VERSION
+plg.gramps_target_version = major_version

into all gpr.py files for the core set of plugins.


regards,
Jérôme




Le Mercredi 18 juin 2014 16h22, John Ralls <jralls@ceridwen.us> a écrit :



On 18 Jun 2014, at 06:56, Jerome <romjerome@yahoo.fr> wrote:

> Devs,
>
>
> I made a mixup ... by setting a constant on all gpr.py files, like into Geography.gpr.py. Something like:
>
> +MODULE_VERSION="4.2"
> +
>  #------------------------------------------------------------------------
>
> -plg.gramps_target_version = '4.1'
> +plg.gramps_target_version = MODULE_VERSION
>  ...
>
> It does not break the design for plugin check,
> and it is rather a minor improvement or refactoring!
>
> It avoids any possible typo and provides consistency
> (no alternate quote mark, spacing or whatever style).
>
>
> Sure, we could also make:
>
> + from gramps.version import major_version
>
> -  MODULE_VERSION="4.2"
> + MODULE_VERSION=major_version
>
> but it is something different because major_version will be no more set into gpr.py files. So, a change on design!
>

No, it's not really a change in design, since we're talking about the plugins in gramps/plugins here. These are maintained with the rest of gramps and are included in each release.  What's more, the version change that we're talking about is to keep them working in the master branch. Needing to bump the version in gramps/plugins/*.gpr.py as well as in gramps.version is pointless.


Regards,
John Ralls