[QGIS-Developer] [Plugins]: is 'plugin_dependencies' being enforced somewhere?

Germán Carrillo carrillo.german at gmail.com
Tue Mar 29 07:50:37 PDT 2022


Hi Richard,


see the first part of the answer to "Using QGIS plugin from another plugin"
at GIS.SE [1]

In short, you need to use the independent plugin's name from metadata.txt
(i.e., "name" field) in your dependent plugin's "plugin_dependencies" field.


For instance, the plugin "LADM-COL add-on Ambiente" depends on "Asistente
LADM-COL" (see name field of the latter in [2]). So I need to use
"Asistete LADM-COL" in the plugin_dependecies field of "LADM-COL add-on
Ambiente", like this [3].


Note you may declare a specific version in plugin_dependencies, but keep in
mind that so far this only works if the specified version is the latest
stable or the latest experimental one. Older versions won't be installed by
plugin installer.


Let me know if it's still unclear.


Regards,

Germán
--------
[1]
https://gis.stackexchange.com/questions/403501/using-qgis-plugin-from-another-plugin
[2]
https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/metadata.txt#L2
[3]
https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/metadata.txt#L11


El mar, 29 mar 2022 a las 2:19, Alessandro Pasotti via QGIS-Developer (<
qgis-developer at lists.osgeo.org>) escribió:

> Hi Richard,
>
> it is (was?) enforced by the installer, AFAIK there are no checks on the
> plugins website.
>
> See:
> https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/plugindependencies.py
>
> Cheers
>
>
> On Tue, Mar 29, 2022 at 9:02 AM Richard Duivenvoorde via QGIS-Developer <
> qgis-developer at lists.osgeo.org> wrote:
>
>> Hi Devs,
>>
>> Reading
>>
>> https://docs.qgis.org/3.22/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata
>>
>> about 'plugin_dependencies' and trying it out in a plugin locally, it
>> does not seem to be enforced or so? I added another plugin in metadata
>> (it's not clear from docs what name you need to use: plugin name or
>> module name) thinking I would see some message somewhere.
>>
>> Is there some message on plugins.qgis.org?
>>
>> Or is it just a 'memo' for users who happen to see it in the metadata of
>> a plugin, then a dev should notify the user theirselves?
>>
>> Thanks for any info,
>>
>> Regards,
>>
>> Richard Duivenvoorde
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> --
> Alessandro Pasotti
> QCooperative:  www.qcooperative.net
> ItOpen:   www.itopen.it
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>

--
-----------
   |\__
(:>__)(
   |/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2>


<http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220329/89470f90/attachment.html>


More information about the QGIS-Developer mailing list