Extend work done in 55235e3e to Qt6 build

This commit is contained in:
David Koňařík 2025-09-23 10:56:49 +02:00 committed by Nyall Dawson
parent e290dc7629
commit 96f7eedb77
5 changed files with 25 additions and 245 deletions

View File

@ -1,51 +1,7 @@
import os
from qgis_sip_project import QgisProject, QgisBindings
from pyqtbuild import PyQtBindings, PyQtProject
from sipbuild import Option
class Qgis3DBindings(QgisBindings):
name = "3d"
class QGIS(PyQtProject):
""" The QGIS project. """
def __init__(self):
""" Initialize the project. """
super().__init__()
self.sip_files_dir = '.'
self.bindings_factories = [Qgis3D]
def get_options(self):
""" Return the list of configurable options. """
options = super().get_options()
options.append(
Option('include_dirs', option_type=list,
help="additional directory to search for .sip files",
metavar="DIR"))
return options
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
super().apply_user_defaults(tool)
if self.include_dirs is not None:
self.sip_include_dirs += self.include_dirs
class Qgis3D(PyQtBindings):
""" The QGIS 3D bindings. """
def __init__(self, project):
""" Initialize the bindings. """
super().__init__(project, '3d_p')
self.sip_file = '3d.sip'
self.exceptions = True
self.release_gil = True
self.disabled_features = "@SIP_DISABLE_FEATURES@".split(";")
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
if self.project.py_platform.startswith('win32'):
self.tags.append('WS_WIN')
elif self.project.py_platform == 'darwin':
self.tags.append('WS_MACX')
else:
self.tags.append('WS_X11')
super().apply_user_defaults(tool)
class Qgis3DProject(QgisProject):
bindings_factories = [Qgis3DBindings]

View File

@ -1,51 +1,7 @@
import os
from qgis_sip_project import QgisProject, QgisBindings
from pyqtbuild import PyQtBindings, PyQtProject
from sipbuild import Option
class QgisAnalysisBindings(QgisBindings):
name = "analysis"
class QGIS(PyQtProject):
""" The QGIS project. """
def __init__(self):
""" Initialize the project. """
super().__init__()
self.sip_files_dir = '.'
self.bindings_factories = [QgisAnalysis]
def get_options(self):
""" Return the list of configurable options. """
options = super().get_options()
options.append(
Option('include_dirs', option_type=list,
help="additional directory to search for .sip files",
metavar="DIR"))
return options
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
super().apply_user_defaults(tool)
if self.include_dirs is not None:
self.sip_include_dirs += self.include_dirs
class QgisAnalysis(PyQtBindings):
""" The QGIS Analysis bindings. """
def __init__(self, project):
""" Initialize the bindings. """
super().__init__(project, 'analysis')
self.sip_file = 'analysis.sip'
self.exceptions = True
self.release_gil = True
self.disabled_features = "@SIP_DISABLE_FEATURES@".split(";")
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
if self.project.py_platform.startswith('win32'):
self.tags.append('WS_WIN')
elif self.project.py_platform == 'darwin':
self.tags.append('WS_MACX')
else:
self.tags.append('WS_X11')
super().apply_user_defaults(tool)
class QgisAnalysisProject(QgisProject):
bindings_factories = [QgisAnalysisBindings]

View File

@ -1,51 +1,7 @@
import os
from qgis_sip_project import QgisProject, QgisBindings
from pyqtbuild import PyQtBindings, PyQtProject
from sipbuild import Option
class QgisCoreBindings(QgisBindings):
name = "core"
class QGIS(PyQtProject):
""" The QGIS project. """
def __init__(self):
""" Initialize the project. """
super().__init__()
self.sip_files_dir = '.'
self.bindings_factories = [QgisCore]
def get_options(self):
""" Return the list of configurable options. """
options = super().get_options()
options.append(
Option('include_dirs', option_type=list,
help="additional directory to search for .sip files",
metavar="DIR"))
return options
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
super().apply_user_defaults(tool)
if self.include_dirs is not None:
self.sip_include_dirs += self.include_dirs
class QgisCore(PyQtBindings):
""" The QGIS Core bindings. """
def __init__(self, project):
""" Initialize the bindings. """
super().__init__(project, 'core')
self.sip_file = 'core.sip'
self.exceptions = True
self.release_gil = True
self.disabled_features = "@SIP_DISABLE_FEATURES@".split(";")
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
if self.project.py_platform.startswith('win32'):
self.tags.append('WS_WIN')
elif self.project.py_platform == 'darwin':
self.tags.append('WS_MACX')
else:
self.tags.append('WS_X11')
super().apply_user_defaults(tool)
class QgisCoreProject(QgisProject):
bindings_factories = [QgisCoreBindings]

View File

@ -1,51 +1,7 @@
import os
from qgis_sip_project import QgisProject, QgisBindings
from pyqtbuild import PyQtBindings, PyQtProject
from sipbuild import Option
class QgisGuiBindings(QgisBindings):
name = "gui"
class QGIS(PyQtProject):
""" The QGIS project. """
def __init__(self):
""" Initialize the project. """
super().__init__()
self.sip_files_dir = '.'
self.bindings_factories = [QgisGui]
def get_options(self):
""" Return the list of configurable options. """
options = super().get_options()
options.append(
Option('include_dirs', option_type=list,
help="additional directory to search for .sip files",
metavar="DIR"))
return options
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
super().apply_user_defaults(tool)
if self.include_dirs is not None:
self.sip_include_dirs += self.include_dirs
class QgisGui(PyQtBindings):
""" The QGIS Gui bindings. """
def __init__(self, project):
""" Initialize the bindings. """
super().__init__(project, 'gui')
self.sip_file = 'gui.sip'
self.exceptions = True
self.release_gil = True
self.disabled_features = "@SIP_DISABLE_FEATURES@".split(";")
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
if self.project.py_platform.startswith('win32'):
self.tags.append('WS_WIN')
elif self.project.py_platform == 'darwin':
self.tags.append('WS_MACX')
else:
self.tags.append('WS_X11')
super().apply_user_defaults(tool)
class QgisGuiProject(QgisProject):
bindings_factories = [QgisGuiBindings]

View File

@ -1,51 +1,7 @@
import os
from qgis_sip_project import QgisProject, QgisBindings
from pyqtbuild import PyQtBindings, PyQtProject
from sipbuild import Option
class QgisServerBindings(QgisBindings):
name = "server"
class QGIS(PyQtProject):
""" The QGIS project. """
def __init__(self):
""" Initialize the project. """
super().__init__()
self.sip_files_dir = '.'
self.bindings_factories = [QgisServer]
def get_options(self):
""" Return the list of configurable options. """
options = super().get_options()
options.append(
Option('include_dirs', option_type=list,
help="additional directory to search for .sip files",
metavar="DIR"))
return options
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
super().apply_user_defaults(tool)
if self.include_dirs is not None:
self.sip_include_dirs += self.include_dirs
class QgisServer(PyQtBindings):
""" The QGIS Server bindings. """
def __init__(self, project):
""" Initialize the bindings. """
super().__init__(project, 'server')
self.sip_file = 'server.sip'
self.exceptions = True
self.release_gil = True
self.disabled_features = "@SIP_DISABLE_FEATURES@".split(";")
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """
if self.project.py_platform.startswith('win32'):
self.tags.append('WS_WIN')
elif self.project.py_platform == 'darwin':
self.tags.append('WS_MACX')
else:
self.tags.append('WS_X11')
super().apply_user_defaults(tool)
class QgisServerProject(QgisProject):
bindings_factories = [QgisServerBindings]