Skip to content

Commit 32de07d

Browse files
committed
Remove the support for reading python plugin metadata from __init__.py
From now on, plugins must have metadata.txt file (with INI format) that is used for storing of metadata. This has two advantages: - plugins do not need to be loaded in order to read metadata - repository can parse the metadata more easily
1 parent 41dc754 commit 32de07d

File tree

12 files changed

+41
-139
lines changed

12 files changed

+41
-139
lines changed

python/plugins/GdalTools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PYQT4_ADD_RESOURCES(PYRC_FILES resources.qrc)
99
SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES})
1010

1111
#INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools)
12-
PLUGIN_INSTALL(GdalTools . ${INSTALLER_FILES} __init__.py)
12+
PLUGIN_INSTALL(GdalTools . ${INSTALLER_FILES} __init__.py metadata.txt)
1313

1414
ADD_SUBDIRECTORY(tools)
1515
ADD_SUBDIRECTORY(icons)

python/plugins/GdalTools/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@
1717
***************************************************************************/
1818
This script initializes the plugin, making it known to QGIS.
1919
"""
20-
def name():
21-
return "GdalTools"
22-
def description():
23-
return "Integrate gdal tools into qgis"
24-
def category():
25-
return "Raster"
26-
def version():
27-
return "Version 1.2.29"
28-
def qgisMinimumVersion():
29-
return "1.0"
30-
def icon():
31-
return "icons/raster-info.png"
3220
def classFactory(iface):
3321
# load GdalTools class from file GdalTools
3422
from GdalTools import GdalTools

python/plugins/db_manager/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ FILE(GLOB UI_FILES ui/*.ui)
88
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
99
PYQT4_ADD_RESOURCES(PYRC_FILES resources.qrc)
1010

11-
PLUGIN_INSTALL(db_manager . ${OTHER_FILES} ${PY_FILES} ${PYRC_FILES})
11+
PLUGIN_INSTALL(db_manager . ${OTHER_FILES} ${PY_FILES} ${PYRC_FILES} metadata.txt)
1212
PLUGIN_INSTALL(db_manager ui ${PYUI_FILES} ui/__init__.py)

python/plugins/db_manager/__init__.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,6 @@
2020
***************************************************************************/
2121
"""
2222

23-
def name():
24-
return "DB Manager"
25-
26-
def description():
27-
return "Manage your databases within QGis"
28-
29-
def version():
30-
return "0.1.20"
31-
32-
def qgisMinimumVersion():
33-
return "1.5.0"
34-
35-
def icon():
36-
return "icons/dbmanager.png"
37-
38-
def authorName():
39-
return "Giuseppe Sucameli"
40-
4123
def classFactory(iface):
4224
from .db_manager_plugin import DBManagerPlugin
4325
return DBManagerPlugin(iface)

python/plugins/fTools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PYQT4_ADD_RESOURCES(PYRC_FILES resources.qrc)
55

66
SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES})
77

8-
PLUGIN_INSTALL(fTools . ${INSTALLER_FILES} __init__.py)
8+
PLUGIN_INSTALL(fTools . ${INSTALLER_FILES} __init__.py metadata.txt)
99

1010
ADD_SUBDIRECTORY(tools)
1111
ADD_SUBDIRECTORY(icons)

python/plugins/fTools/__init__.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,6 @@
2828
#
2929
#---------------------------------------------------------------------
3030

31-
def name():
32-
return "fTools"
33-
34-
def description():
35-
return "Tools for vector data analysis and management"
36-
37-
def category():
38-
return "Vector"
39-
40-
def version():
41-
return "0.6.2"
42-
43-
def qgisMinimumVersion():
44-
return "1.4"
45-
46-
def icon():
47-
return "icons/logo_small.png"
48-
49-
def authorName():
50-
return "Carson J. Q. Farmer"
51-
5231
def classFactory( iface ):
5332
from .fTools import fToolsPlugin
5433
return fToolsPlugin( iface )

python/plugins/mapserver_export/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SET(INSTALLER_FILES
2+
metadata.txt
23
mapserver_export.png
34
__init__.py
45
mapserverexportdialog.py

python/plugins/mapserver_export/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,6 @@
1919
This script initializes the plugin, making it known to QGIS.
2020
"""
2121

22-
def name():
23-
return "MapServer Export"
24-
def description():
25-
return "Export a saved QGIS project file to a MapServer map file"
26-
def category():
27-
return "Web"
28-
def version():
29-
return "Version 0.4.4"
30-
def qgisMinimumVersion():
31-
return "1.0"
32-
def icon():
33-
return "mapserver_export.png"
34-
def authorName():
35-
return "Gary E. Sherman"
3622
def classFactory(iface):
3723
# load MapServerExport class from file mapserverexport.py
3824
from mapserverexport import MapServerExport

python/plugins/plugin_installer/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SET(INSTALLER_FILES
2+
metadata.txt
23
__init__.py
34
installer_data.py
45
installer_gui.py

python/plugins/plugin_installer/__init__.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,6 @@
1111
* *
1212
***************************************************************************/
1313
"""
14-
def name():
15-
return "Plugin Installer"
16-
17-
def version():
18-
return "Version 1.2.1"
19-
20-
def description():
21-
return "Downloads and installs QGIS python plugins"
22-
23-
def category():
24-
return "Plugins"
25-
26-
def qgisMinimumVersion():
27-
return "1.0"
28-
29-
def icon():
30-
import resources_rc
31-
return ":/plugins/installer/plugin_installer.png"
32-
33-
def authorName():
34-
return "Matthew Perry, Borys Jurgiel"
35-
36-
def homepage():
37-
return "http://bwj.aster.net.pl/qgis/"
3814

3915
def classFactory(iface):
4016
from installer_plugin import InstallerPlugin

0 commit comments

Comments
 (0)