Skip to content

Commit e5b02cd

Browse files
committed
use dedicated files for auto additions
1 parent 7cb18cd commit e5b02cd

23 files changed

+118
-41
lines changed

python/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,19 @@ ENDFOREACH(pyfile)
327327
FOREACH(module ${PY_MODULES})
328328
ADD_CUSTOM_TARGET(py${module} ALL)
329329
ADD_DEPENDENCIES(py${module} python_module_qgis__${module})
330+
331+
332+
# concat auto_additions/*.py in _module_/__init__.py
333+
FILE(GLOB PY_FILES_AUTO_ADDITIONS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/auto_additions/*.py)
334+
FOREACH(pyfile ${PY_FILES_AUTO_ADDITIONS})
335+
file(READ ${IN_FILE} CONTENTS)
336+
file(APPEND ${OUT_FILE} "${CONTENTS}")
337+
ENDFOREACH(pyfile)
338+
configure_file(somefile.sql.in somefile.sql COPYONLY)
339+
330340
FILE(GLOB PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/*.py)
331-
FILE(GLOB PY_FILES_ADDITIONS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/additions/*.py)
332341
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/${module}")
342+
FILE(GLOB PY_FILES_ADDITIONS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/additions/*.py)
333343
INSTALL(FILES ${PY_FILES_ADDITIONS} DESTINATION "${QGIS_PYTHON_DIR}/${module}/additions")
334344
SET(PY_FILES ${PY_FILES} ${PY_FILES_ADDITIONS})
335345
FOREACH(pyfile ${PY_FILES})
File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
This folder is completed using sipify.pl script
3+
It is not aimed to be manually edited
4+
"""
File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
This folder is completed using sipify.pl script
3+
It is not aimed to be manually edited
4+
"""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The following has been generated automatically from src/core/qgsdataitem.h
2+
QgsDataItem.Type.baseClass = QgsDataItem
3+
QgsDataItem.State.baseClass = QgsDataItem
4+
QgsLayerItem.LayerType.baseClass = QgsLayerItem
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The following has been generated automatically from src/core/qgsfieldproxymodel.h
2+
QgsFieldProxyModel.Filters.baseClass = QgsFieldProxyModel
3+
Filters = QgsFieldProxyModel # dirty hack since SIP seems to introduce the flags in module
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The following has been generated automatically from src/core/geometry/qgsgeometry.h
2+
QgsGeometry.BufferSide.baseClass = QgsGeometry
3+
QgsGeometry.EndCapStyle.baseClass = QgsGeometry
4+
QgsGeometry.JoinStyle.baseClass = QgsGeometry
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The following has been generated automatically from src/core/qgsmaplayerproxymodel.h
2+
QgsMapLayerProxyModel.Filters.baseClass = QgsMapLayerProxyModel
3+
Filters = QgsMapLayerProxyModel # dirty hack since SIP seems to introduce the flags in module
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The following has been generated automatically from src/core/qgssnappingconfig.h
2+
QgsSnappingConfig.SnappingMode.baseClass = QgsSnappingConfig
3+
QgsSnappingConfig.SnappingType.baseClass = QgsSnappingConfig

0 commit comments

Comments
 (0)