mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
ENH: remove useless QApplication and prefer to use QGIS_PREFIX_PATH
This commit is contained in:
parent
b88d92df19
commit
82f2726d7f
@ -695,10 +695,10 @@ def create_html_description():
|
||||
if __name__ == "__main__":
|
||||
# Prepare the environment
|
||||
from qgis.core import QgsApplication
|
||||
from qgis.PyQt.QtWidgets import QApplication
|
||||
app = QApplication([])
|
||||
QgsApplication.setPrefixPath("/usr", True)
|
||||
|
||||
app = QgsApplication([], True)
|
||||
QgsApplication.initQgis()
|
||||
|
||||
# Prepare processing framework
|
||||
from processing.core.Processing import Processing
|
||||
Processing.initialize()
|
||||
@ -719,4 +719,3 @@ if __name__ == "__main__":
|
||||
|
||||
# Exit applications
|
||||
QgsApplication.exitQgis()
|
||||
QApplication.exit()
|
||||
|
@ -18,9 +18,10 @@ export LD_LIBRARY_PATH=/path/to/OTB/install/lib/:$LD_LIBRARY_PATH
|
||||
|
||||
Set QGIS environment
|
||||
---------------------
|
||||
export QGIS_PREFIX_PATH=/path/to/QGIS/install
|
||||
export PYTHONPATH=:/usr/share/qgis/python/plugins:~/.qgis2/python/plugins:$PYTHONPATH
|
||||
# Set LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=/path/to/QGIS/install/lib/:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$QGIS_PREFIX_PATH/lib/:$LD_LIBRARY_PATH
|
||||
# Add maintenance folder to python path
|
||||
export PYTHONPATH=/path/to/QGIS/src/python/plugins/processing/algs/otb/maintenance:$PYTHONPATH
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user