Skip to content

Commit

Permalink
Update plugin structure requirements for upload to directory (#9303)
Browse files Browse the repository at this point in the history
* add reference to required LICENSE file
* Add clarifications on license file
- required for updates to existing plugins as well as publishing new ones
- fix a couple of typos
* Remove resources* files in plugin structure

---------

Co-authored-by: Harrissou Sant-anna <[email protected]>
Co-authored-by: Étienne Trimaille <[email protected]>
  • Loading branch information
3 people authored Oct 15, 2024
1 parent 9dd4b90 commit cfcbdd2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions docs/pyqgis_developer_cookbook/plugins/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
17 changes: 9 additions & 8 deletions docs/pyqgis_developer_cookbook/plugins/releasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ a plugin on the official repository:
#. all required metadata listed in :ref:`metadata table<plugin_metadata_table>`
must be present
#. the `version` metadata field must be unique
#. a license file must be included, saved as ``LICENSE`` with no extension (i.e.
not ``LICENSE.txt`` for example)

Plugin structure
................
Expand All @@ -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. Following is an example of how a :file:`plugin.zip`
could look like.

::

Expand All @@ -123,14 +125,13 @@ look like.
| |-- translation_file_de.ts
|-- img
| |-- icon.png
| `-- iconsource.svg
| |-- iconsource.svg
|-- __init__.py
|-- LICENSE
|-- Makefile
|-- metadata.txt
|-- more_code.py
|-- main_code.py
|-- README
|-- resources.qrc
|-- resources_rc.py
`-- ui_Qt_user_interface_file.ui
|-- ui_Qt_user_interface_file.ui

0 comments on commit cfcbdd2

Please sign in to comment.