-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix output directory for pyqgis console on installing
- Loading branch information
Showing
6 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
ADD_SUBDIRECTORY(console_help) | ||
|
||
SET(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python) | ||
SET(QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR}/qgis) | ||
SET (QGIS_CONSOLE_DIR ${QGIS_DATA_DIR}/python/console) | ||
SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python) | ||
|
||
# PyQGIS console files to copy to staging or install | ||
SET(PY_CONSOLE_FILES | ||
console.py | ||
console_sci.py | ||
console_help.py | ||
console_settings.py | ||
console_output.py | ||
__init__.py | ||
) | ||
|
||
FILE(GLOB UI_FILES *.ui) | ||
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES}) # returns absolute paths | ||
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES}) | ||
ADD_CUSTOM_TARGET(pyconsole ALL DEPENDS ${PYUI_FILES}) | ||
|
||
# stage to output to make available when QGIS is run from build directory | ||
FOREACH(pyfile ${PY_CONSOLE_FILES} ${PYUI_FILES}) | ||
ADD_CUSTOM_COMMAND(TARGET pyconsole | ||
POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}" | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_OUTPUT_DIRECTORY}/console | ||
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${PYTHON_OUTPUT_DIRECTORY}/console | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
DEPENDS ${pyfile} | ||
) | ||
ENDFOREACH(pyfile) | ||
|
||
INSTALL(FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_PYTHON_DIR}") | ||
INSTALL(FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_CONSOLE_DIR}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
*************************************************************************** | ||
__init__.py | ||
--------------------- | ||
Date : September 2012 | ||
Copyright : (C) 2012 by Salvatore Larosa | ||
Email : lrssvtml at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Salvatore Larosa' | ||
__date__ = 'September 2012' | ||
__copyright__ = '(C) 2012, Salvatore Larosa' | ||
# This will get replaced with a git SHA1 when you do a git archive | ||
__revision__ = '$Format:%H$' | ||
|
||
from console import show_console |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters