Skip to content
Permalink
Browse files

ENH: remove useless QApplication and prefer to use QGIS_PREFIX_PATH

(cherry picked from commit 82f2726)
  • Loading branch information
grizonnetm authored and alexbruy committed May 24, 2017
1 parent 1bcaca3 commit e6ca7f19249c4ba6cad1affb87fbed4ebd95c30b
@@ -693,10 +693,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()
@@ -717,4 +717,3 @@ def create_html_description():

# 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

0 comments on commit e6ca7f1

Please sign in to comment.
You can’t perform that action at this time.