~ubuntu-branches/ubuntu/karmic/python-kde3/karmic

« back to all changes in this revision

Viewing changes to pykdeconfig.py.mine

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-11-22 19:03:34 UTC
  • mfrom: (1.1.5 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20061122190334-z7nhzu4dca926iam
Tags: 3.16.0-0ubuntu1
* New upstream release
* Build-depend on pyqt 3.17 and sip 4.5
* Add build-depends on /usr/lib/kde3/libkonsolepart.so
* Don't build for python 2.5, it fails to build
* Merge with Debian, remaining change:
  - kubuntu_01_dcop.diff patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 2004
2
 
#   Riverbank Computing Limited <info@riverbankcomputing.co.uk>
3
 
#   Jim Bublitz <jbublitz@nwinternet.com>
4
 
#
5
 
# This file is part of PyKDE.
6
 
#
7
 
# This copy of PyKDE is free software; you can redistribute it and/or modify it
8
 
# under the terms of the GNU General Public License as published by the Free
9
 
# Software Foundation; either version 2, or (at your option) any later
10
 
# version.
11
 
#
12
 
# PyKDE is supplied in the hope that it will be useful, but WITHOUT ANY
13
 
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
 
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
15
 
# details.
16
 
#
17
 
# You should have received a copy of the GNU General Public License along with
18
 
# PyKDE; see the file LICENSE.  If not, write to the Free Software Foundation,
19
 
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
 
#
21
 
# This module is intended to be used by the configuration scripts of extension
22
 
# modules that %Import PyKDE modules.
23
 
 
24
 
 
25
 
import sipconfig, pyqtconfig
26
 
 
27
 
 
28
 
# These are installation specific values created when PyQt was configured.
29
 
_pkg_config = {
30
 
    'kde_version':          0x030300,
31
 
    'kde_version_extra':    'kde330',
32
 
    'kde_version_sfx':      '-kde330.diff',
33
 
    'kde_version_str':      '3.3.0',
34
 
    'kdebasedir':           '/opt/kde3',
35
 
    'kdeincdir':            '/opt/kde3/include',
36
 
    'kdelibdir':            '/opt/kde3/lib',
37
 
    'pykde_kde_sip_flags':  '-x Qt_STYLE_WINDOWSXP -x Qt_STYLE_INTERLACE -x Qt_STYLE_WINDOWSXP -t WS_X11 -t Qt_3_3_0 -t KDE_3_3_0',
38
 
    'pykde_mod_dir':        '/usr/lib/python2.3/site-packages',
39
 
    'pykde_modules':        'dcop kdecore kdesu kdefx kdeui kio kutils kfile kparts khtml kspell kdeprint kmdi',
40
 
    'pykde_sip_dir':        '/usr/share/sip',
41
 
    'pykde_version':        0x030b03,
42
 
    'pykde_version_str':    '3.11.3'
43
 
}
44
 
 
45
 
 
46
 
 
47
 
class Configuration(pyqtconfig.Configuration):
48
 
    """The class that represents PyQt configuration values.
49
 
    """
50
 
    def __init__(self, sub_cfg=None):
51
 
        """Initialise an instance of the class.
52
 
 
53
 
        sub_cfg is the list of sub-class configurations.  It should be None
54
 
        when called normally.
55
 
        """
56
 
        if sub_cfg:
57
 
            cfg = sub_cfg
58
 
        else:
59
 
            cfg = []
60
 
 
61
 
        cfg.append(_pkg_config)
62
 
 
63
 
        pyqtconfig.Configuration.__init__(self, cfg)
64
 
 
65
 
 
66
 
class DCOPModuleMakefile(pyqtconfig.QtModuleMakefile):
67
 
    """The Makefile class for modules that %Import DCOP.
68
 
    """
69
 
    def finalise(self):
70
 
        """Finalise the macros.
71
 
        """
72
 
        if self.config.sip_version < 0x040000:
73
 
            # Note that we don't use self.extra_lib_dirs because we don't want
74
 
            # it to be added to the rpath.
75
 
            self.LIBDIR.append(self.config.pykde_mod_dir)
76
 
            self.LIBDIR.append(self.config.pykde_lib_dir)
77
 
            self.extra_libs.append(self.module_as_lib("DCOP"))
78
 
 
79
 
        pyqtconfig.QtModuleMakefile.finalise(self)
80
 
 
81
 
class KdecoreModuleMakefile(DCOPModuleMakefile):
82
 
    """The Makefile class for modules that %Import kdecore.
83
 
    """
84
 
    def finalise(self):
85
 
        """Finalise the macros.
86
 
        """
87
 
        if self.config.sip_version < 0x040000:
88
 
            # Note that we don't use self.extra_lib_dirs because we don't want
89
 
            # it to be added to the rpath.
90
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
91
 
            self.extra_libs.append(self.module_as_lib("kdecore"))
92
 
 
93
 
        DCOPModuleMakefile.finalise(self)
94
 
 
95
 
class KdesuModuleMakefile(KdecoreModuleMakefile):
96
 
    """The Makefile class for modules that %Import kdesu.
97
 
    """
98
 
    def finalise(self):
99
 
        """Finalise the macros.
100
 
        """
101
 
        if self.config.sip_version < 0x040000:
102
 
            # Note that we don't use self.extra_lib_dirs because we don't want
103
 
            # it to be added to the rpath.
104
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
105
 
            self.extra_libs.append(self.module_as_lib("kdesu"))
106
 
 
107
 
        KdecoreModuleMakefile.finalise(self)
108
 
 
109
 
class KdefxModuleMakefile(KdecoreModuleMakefile):
110
 
    """The Makefile class for modules that %Import kdefx.
111
 
    """
112
 
    def finalise(self):
113
 
        """Finalise the macros.
114
 
        """
115
 
        if self.config.sip_version < 0x040000:
116
 
            # Note that we don't use self.extra_lib_dirs because we don't want
117
 
            # it to be added to the rpath.
118
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
119
 
            self.extra_libs.append(self.module_as_lib("kdefx"))
120
 
 
121
 
        KdecoreModuleMakefile.finalise(self)
122
 
 
123
 
class KdeuiModuleMakefile(KdefxModuleMakefile):
124
 
    """The Makefile class for modules that %Import kdeui.
125
 
    """
126
 
    def finalise(self):
127
 
        """Finalise the macros.
128
 
        """
129
 
        if self.config.sip_version < 0x040000:
130
 
            # Note that we don't use self.extra_lib_dirs because we don't want
131
 
            # it to be added to the rpath.
132
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
133
 
            self.extra_libs.append(self.module_as_lib("kdeui"))
134
 
 
135
 
        if self.config.sip_version < 0x040000:
136
 
            self.extra_libs.append(self.module_as_lib("qtxml"))
137
 
 
138
 
        KdefxModuleMakefile.finalise(self)
139
 
 
140
 
class KioModuleMakefile(KdeuiModuleMakefile):
141
 
    """The Makefile class for modules that %Import kio.
142
 
    """
143
 
    def finalise(self):
144
 
        """Finalise the macros.
145
 
        """
146
 
        if self.config.sip_version < 0x040000:
147
 
            # Note that we don't use self.extra_lib_dirs because we don't want
148
 
            # it to be added to the rpath.
149
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
150
 
            self.extra_libs.append(self.module_as_lib("kio"))
151
 
 
152
 
        KdeuiModuleMakefile.finalise(self)
153
 
 
154
 
class KfileModuleMakefile(KioModuleMakefile):
155
 
    """The Makefile class for modules that %Import kfile.
156
 
    """
157
 
    def finalise(self):
158
 
        """Finalise the macros.
159
 
        """
160
 
        if self.config.sip_version < 0x040000:
161
 
            # Note that we don't use self.extra_lib_dirs because we don't want
162
 
            # it to be added to the rpath.
163
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
164
 
            self.extra_libs.append(self.module_as_lib("kfile"))
165
 
 
166
 
        KioModuleMakefile.finalise(self)
167
 
 
168
 
class KpartsModuleMakefile(KfileModuleMakefile):
169
 
    """The Makefile class for modules that %Import kparts.
170
 
    """
171
 
    def finalise(self):
172
 
        """Finalise the macros.
173
 
        """
174
 
        if self.config.sip_version < 0x040000:
175
 
            # Note that we don't use self.extra_lib_dirs because we don't want
176
 
            # it to be added to the rpath.
177
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
178
 
            self.extra_libs.append(self.module_as_lib("kparts"))
179
 
 
180
 
        KfileModuleMakefile.finalise(self)
181
 
 
182
 
class KhtmlModuleMakefile(KpartsModuleMakefile):
183
 
    """The Makefile class for modules that %Import khtml.
184
 
    """
185
 
    def finalise(self):
186
 
        """Finalise the macros.
187
 
        """
188
 
        if self.config.sip_version < 0x040000:
189
 
            # Note that we don't use self.extra_lib_dirs because we don't want
190
 
            # it to be added to the rpath.
191
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
192
 
            self.extra_libs.append(self.module_as_lib("khtml"))
193
 
 
194
 
        KpartsModuleMakefile.finalise(self)
195
 
 
196
 
class KjsModuleMakefile(KhtmlModuleMakefile):
197
 
    """The Makefile class for modules that %Import kjs.
198
 
    """
199
 
    def finalise(self):
200
 
        """Finalise the macros.
201
 
        """
202
 
        if self.config.sip_version < 0x040000:
203
 
            # Note that we don't use self.extra_lib_dirs because we don't want
204
 
            # it to be added to the rpath.
205
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
206
 
            self.extra_libs.append(self.module_as_lib("kjs"))
207
 
 
208
 
        KjsModuleMakefile.finalise(self)
209
 
 
210
 
class KdeprintModuleMakefile(KdeuiModuleMakefile):
211
 
    """The Makefile class for modules that %Import kdeprint.
212
 
    """
213
 
    def finalise(self):
214
 
        """Finalise the macros.
215
 
        """
216
 
        if self.config.sip_version < 0x040000:
217
 
            # Note that we don't use self.extra_lib_dirs because we don't want
218
 
            # it to be added to the rpath.
219
 
            self.LIBDIR.append(self.config.pyqt_mod_dir)
220
 
            self.extra_libs.append(self.module_as_lib("kdeprint"))
221
 
 
222
 
        KdeuiModuleMakefile.finalise(self)