From bf4e8f350603cc27fb24b138717785dbde59f3a2 Mon Sep 17 00:00:00 2001 From: Alexei Schwab Date: Mon, 14 Oct 2024 14:53:48 +0100 Subject: [PATCH 1/5] Update plugin structure requirements for upload to directory add reference to required LICENSE file --- docs/pyqgis_developer_cookbook/plugins/releasing.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/pyqgis_developer_cookbook/plugins/releasing.rst b/docs/pyqgis_developer_cookbook/plugins/releasing.rst index dbde32812cf..8c25139e17f 100644 --- a/docs/pyqgis_developer_cookbook/plugins/releasing.rst +++ b/docs/pyqgis_developer_cookbook/plugins/releasing.rst @@ -102,6 +102,8 @@ a plugin on the official repository: #. all required metadata listed in :ref:`metadata table` must be present #. the `version` metadata field must be unique +#. a licence file must be included, saved as `LICENSE` with no extension (i.e. + not `LICENSE.txt`) Plugin structure ................ @@ -110,10 +112,10 @@ Following the validation rules the compressed (.zip) package of your plugin must have a specific structure to validate as a functional plugin. As the plugin will be unzipped inside the users plugins folder it must have it's own directory inside the .zip file to not interfere with other plugins. Mandatory -files are: :file:`metadata.txt` and :file:`__init__.py`. But it would be nice -to have a :file:`README` and of course an icon to represent the plugin -(:file:`resources.qrc`). Following is an example of how a plugin.zip should -look like. +files are: :file:`metadata.txt`, :file:`__init__.py` and :file:`LICENSE`. +But it would be nice to have a :file:`README` and of course an icon to represent +the plugin (:file:`resources.qrc`). Following is an example of how a plugin.zip +should look like. :: @@ -125,6 +127,7 @@ look like. | |-- icon.png | `-- iconsource.svg |-- __init__.py + |-- LICENSE |-- Makefile |-- metadata.txt |-- more_code.py From 61ba7afe1eaac2bd4959b1e7e4253c1bcd1b820d Mon Sep 17 00:00:00 2001 From: Alexei Schwab Date: Tue, 15 Oct 2024 08:17:49 +0100 Subject: [PATCH 2/5] Update docs/pyqgis_developer_cookbook/plugins/releasing.rst Co-authored-by: Harrissou Sant-anna --- docs/pyqgis_developer_cookbook/plugins/releasing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pyqgis_developer_cookbook/plugins/releasing.rst b/docs/pyqgis_developer_cookbook/plugins/releasing.rst index 8c25139e17f..e077ac7e7d7 100644 --- a/docs/pyqgis_developer_cookbook/plugins/releasing.rst +++ b/docs/pyqgis_developer_cookbook/plugins/releasing.rst @@ -102,8 +102,8 @@ a plugin on the official repository: #. all required metadata listed in :ref:`metadata table` must be present #. the `version` metadata field must be unique -#. a licence file must be included, saved as `LICENSE` with no extension (i.e. - not `LICENSE.txt`) +#. a licence file must be included, saved as ``LICENSE`` with no extension (i.e. + not ``LICENSE.txt`` for example) Plugin structure ................ From b104286c163df9ba327c97c771337dee2664f701 Mon Sep 17 00:00:00 2001 From: Alexei Schwab Date: Tue, 15 Oct 2024 08:17:56 +0100 Subject: [PATCH 3/5] Update docs/pyqgis_developer_cookbook/plugins/releasing.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Étienne Trimaille --- docs/pyqgis_developer_cookbook/plugins/releasing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pyqgis_developer_cookbook/plugins/releasing.rst b/docs/pyqgis_developer_cookbook/plugins/releasing.rst index e077ac7e7d7..6ca745d5c79 100644 --- a/docs/pyqgis_developer_cookbook/plugins/releasing.rst +++ b/docs/pyqgis_developer_cookbook/plugins/releasing.rst @@ -114,7 +114,7 @@ plugin will be unzipped inside the users plugins folder it must have it's own directory inside the .zip file to not interfere with other plugins. Mandatory files are: :file:`metadata.txt`, :file:`__init__.py` and :file:`LICENSE`. But it would be nice to have a :file:`README` and of course an icon to represent -the plugin (:file:`resources.qrc`). Following is an example of how a plugin.zip +the plugin. Following is an example of how a :file:`plugin.zip` should look like. :: From d9c3df64774915022084550753b596f1b4dcf4e3 Mon Sep 17 00:00:00 2001 From: Alexei Schwab Date: Tue, 15 Oct 2024 08:27:09 +0100 Subject: [PATCH 4/5] Add clarifications on license file - required for updates to existing plugins as well as publishing new ones - fix a couple of typos --- docs/pyqgis_developer_cookbook/plugins/plugins.rst | 3 +++ docs/pyqgis_developer_cookbook/plugins/releasing.rst | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/pyqgis_developer_cookbook/plugins/plugins.rst b/docs/pyqgis_developer_cookbook/plugins/plugins.rst index dde40494abe..6c82b99f7b9 100644 --- a/docs/pyqgis_developer_cookbook/plugins/plugins.rst +++ b/docs/pyqgis_developer_cookbook/plugins/plugins.rst @@ -69,6 +69,9 @@ A typical plugin directory includes the following files: relative paths to resources used in the GUI forms. * :file:`resources.py` - *compiled resources, optional* - The translation of the .qrc file described above to Python. +* :file:`LICENSE` - *required* if plugin is to be published or updated in the + QGIS Plugins Directory, otherwise *optional*. File should be a plain text file + with no file extension in the filename. .. warning:: If you plan to upload the plugin to the :ref:`official_pyqgis_repository` diff --git a/docs/pyqgis_developer_cookbook/plugins/releasing.rst b/docs/pyqgis_developer_cookbook/plugins/releasing.rst index 6ca745d5c79..cbcbbc24a74 100644 --- a/docs/pyqgis_developer_cookbook/plugins/releasing.rst +++ b/docs/pyqgis_developer_cookbook/plugins/releasing.rst @@ -102,7 +102,7 @@ a plugin on the official repository: #. all required metadata listed in :ref:`metadata table` must be present #. the `version` metadata field must be unique -#. a licence file must be included, saved as ``LICENSE`` with no extension (i.e. +#. a license file must be included, saved as ``LICENSE`` with no extension (i.e. not ``LICENSE.txt`` for example) Plugin structure @@ -125,7 +125,7 @@ should look like. | |-- translation_file_de.ts |-- img | |-- icon.png - | `-- iconsource.svg + | |-- iconsource.svg |-- __init__.py |-- LICENSE |-- Makefile From b75d692e0c50c6e46764be7c06314c85374056ba Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Tue, 15 Oct 2024 18:24:36 +0200 Subject: [PATCH 5/5] Remove resources* files in plugin structure --- docs/pyqgis_developer_cookbook/plugins/releasing.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/pyqgis_developer_cookbook/plugins/releasing.rst b/docs/pyqgis_developer_cookbook/plugins/releasing.rst index cbcbbc24a74..931a6e6ccb3 100644 --- a/docs/pyqgis_developer_cookbook/plugins/releasing.rst +++ b/docs/pyqgis_developer_cookbook/plugins/releasing.rst @@ -115,7 +115,7 @@ directory inside the .zip file to not interfere with other plugins. Mandatory files are: :file:`metadata.txt`, :file:`__init__.py` and :file:`LICENSE`. But it would be nice to have a :file:`README` and of course an icon to represent the plugin. Following is an example of how a :file:`plugin.zip` -should look like. +could look like. :: @@ -133,7 +133,5 @@ should look like. |-- more_code.py |-- main_code.py |-- README - |-- resources.qrc - |-- resources_rc.py - `-- ui_Qt_user_interface_file.ui + |-- ui_Qt_user_interface_file.ui