Skip to content
Permalink
Browse files

ENH: remove useless QApplication and prefer to use QGIS_PREFIX_PATH

  • Loading branch information
grizonnetm committed Aug 21, 2016
1 parent b88d92d commit 82f2726d7f60a089f1de12dcf121f02241caf756
@@ -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 @@ 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 82f2726

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