Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin structure requirements for upload to directory #9303

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading