SIP4 python bindings for TQt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pyqtconfig.py.in 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # Copyright (c) 2007
  2. # Riverbank Computing Limited <info@riverbankcomputing.co.uk>
  3. #
  4. # This file is part of PyTQt.
  5. #
  6. # This copy of PyTQt is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by the Free
  8. # Software Foundation; either version 2, or (at your option) any later
  9. # version.
  10. #
  11. # PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
  12. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  14. # details.
  15. #
  16. # You should have received a copy of the GNU General Public License along with
  17. # PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
  18. # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. #
  20. # This module is intended to be used by the configuration scripts of extension
  21. # modules that %Import PyTQt modules.
  22. from sip4_tqt import sipconfig
  23. # These are installation specific values created when PyTQt was configured.
  24. # @SIP_CONFIGURATION@
  25. class Configuration(sipconfig.Configuration):
  26. """The class that represents PyTQt configuration values.
  27. """
  28. def __init__(self, sub_cfg=None):
  29. """Initialise an instance of the class.
  30. sub_cfg is the list of sub-class configurations. It should be None
  31. when called normally.
  32. """
  33. if sub_cfg:
  34. cfg = sub_cfg
  35. else:
  36. cfg = []
  37. cfg.append(_pkg_config)
  38. sipconfig.Configuration.__init__(self, cfg)
  39. class TQtModuleMakefile(sipconfig.SIPModuleMakefile):
  40. """The Makefile class for modules that %Import qt.
  41. """
  42. def __init__(self, *args, **kw):
  43. """Initialise an instance of a module Makefile.
  44. """
  45. kw["qt"] = 1
  46. apply(sipconfig.SIPModuleMakefile.__init__, (self, ) + args, kw)
  47. def finalise(self):
  48. """Finalise the macros.
  49. """
  50. if self.config.sip_version < 0x040000:
  51. # Note that we don't use self.extra_lib_dirs because we don't want
  52. # it to be added to the rpath.
  53. self.LIBDIR.append(self.config.pyqt_mod_dir)
  54. self.extra_libs.append(self.module_as_lib("qt"))
  55. sipconfig.SIPModuleMakefile.finalise(self)
  56. class TQtAxContainerModuleMakefile(TQtModuleMakefile):
  57. """The Makefile class for modules that %Import qtaxcontainer.
  58. """
  59. def finalise(self):
  60. """Finalise the macros.
  61. """
  62. if self.config.sip_version < 0x040000:
  63. self.extra_libs.append(self.module_as_lib("qtaxcontainer"))
  64. TQtModuleMakefile.finalise(self)
  65. class TQtCanvasModuleMakefile(TQtModuleMakefile):
  66. """The Makefile class for modules that %Import qtcanvas.
  67. """
  68. def finalise(self):
  69. """Finalise the macros.
  70. """
  71. if self.config.sip_version < 0x040000:
  72. self.extra_libs.append(self.module_as_lib("qtcanvas"))
  73. TQtModuleMakefile.finalise(self)
  74. class TQtExtModuleMakefile(TQtModuleMakefile):
  75. """The Makefile class for modules that %Import qtext.
  76. """
  77. def finalise(self):
  78. """Finalise the macros.
  79. """
  80. if self.config.sip_version < 0x040000:
  81. self.extra_libs.append(self.module_as_lib("qtext"))
  82. self.extra_defines.extend(self.config._pyqt_qscintilla_defines)
  83. self.extra_include_dirs.append(self.config._pyqt_qscintilla_inc_dir)
  84. self.extra_lib_dirs.append(self.config._pyqt_qscintilla_lib_dir)
  85. self.extra_libs.append("qscintilla")
  86. TQtModuleMakefile.finalise(self)
  87. class TQtGLModuleMakefile(TQtModuleMakefile):
  88. """The Makefile class for modules that %Import qtgl.
  89. """
  90. def __init__(self, *args, **kw):
  91. """Initialise an instance of a module Makefile.
  92. """
  93. kw["opengl"] = 1
  94. apply(TQtModuleMakefile.__init__, (self, ) + args, kw)
  95. def finalise(self):
  96. """Finalise the macros.
  97. """
  98. if self.config.sip_version < 0x040000:
  99. self.extra_libs.append(self.module_as_lib("qtgl"))
  100. TQtModuleMakefile.finalise(self)
  101. class TQtNetworkModuleMakefile(TQtModuleMakefile):
  102. """The Makefile class for modules that %Import qtnetwork.
  103. """
  104. def finalise(self):
  105. """Finalise the macros.
  106. """
  107. if self.config.sip_version < 0x040000:
  108. self.extra_libs.append(self.module_as_lib("qtnetwork"))
  109. TQtModuleMakefile.finalise(self)
  110. class TQtTableModuleMakefile(TQtModuleMakefile):
  111. """The Makefile class for modules that %Import qttable.
  112. """
  113. def finalise(self):
  114. """Finalise the macros.
  115. """
  116. if self.config.sip_version < 0x040000:
  117. self.extra_libs.append(self.module_as_lib("qttable"))
  118. TQtModuleMakefile.finalise(self)
  119. class TQtSQLModuleMakefile(TQtTableModuleMakefile):
  120. """The Makefile class for modules that %Import qtsql.
  121. """
  122. def finalise(self):
  123. """Finalise the macros.
  124. """
  125. if self.config.sip_version < 0x040000:
  126. self.extra_libs.append(self.module_as_lib("qtsql"))
  127. TQtTableModuleMakefile.finalise(self)
  128. class TQtUIModuleMakefile(TQtModuleMakefile):
  129. """The Makefile class for modules that %Import qtui.
  130. """
  131. def finalise(self):
  132. """Finalise the macros.
  133. """
  134. if self.config.sip_version < 0x040000:
  135. self.extra_libs.append(self.module_as_lib("qtui"))
  136. TQtModuleMakefile.finalise(self)
  137. class TQtXMLModuleMakefile(TQtModuleMakefile):
  138. """The Makefile class for modules that %Import qtxml.
  139. """
  140. def finalise(self):
  141. """Finalise the macros.
  142. """
  143. if self.config.sip_version < 0x040000:
  144. self.extra_libs.append(self.module_as_lib("qtxml"))
  145. TQtModuleMakefile.finalise(self)