Update for renamed sip-tqt.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 2 years ago
parent 87509b2877
commit 988a672aae
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -654,10 +654,10 @@ class BuildKControlModule(Command):
# Sip dir
if self.sip_dir is None:
self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
self.sip_dir = os.path.dirname(FindFileInPaths("sip_tqt*", sys.path))
if self.sip_dir is None:
self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt')
if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None):
self.sip_dir = sysconfig.get_python_lib()
if (FindFileInPaths("libsip_tqt*", [self.sip_dir]) is None) and (FindFileInPaths("sip_tqt*", [self.sip_dir]) is None):
raise SystemExit, "Failed to find libsip files in directory: %s" % self.sip_dir
self.announce("Using %s for libsip files" % self.sip_dir)
@ -834,14 +834,14 @@ class BuildKControlModule(Command):
linklist.extend(sysconfig.get_config_var("LIBS").split())
# FIXME I doubt half of these libraries need to be here.
linklist.append(self.sip_dir+"/sip.so")
linklist.append(self.sip_dir+"/sip_tqt.so")
# PyQt libs
linklist.append(self.pyqt_dir+"/qt.so")
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
linklist.append(self.pytde_dir+"/tdeui.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
# # PyQt libs
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
# # PyTDE libs
@ -882,7 +882,7 @@ class BuildKControlModule(Command):
#include <kstandarddirs.h>
#include <ksimpleconfig.h>
#include <tqstring.h>
#include <sip.h>
#include <sip-tqt.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@ -947,19 +947,15 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) {
}
// Inject a helper function
TQString bridge = TQString("from sip4_tqt import sip\n"
TQString bridge = TQString("import sip_tqt\n"
"from python_tqt import qt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
#if SIP_VERSION >= 0x040200
" wparent = sip.wrapinstance(parent,qt.TQWidget)\n"
#else
" wparent = sip.wrapinstance(parent,'TQWidget')\n"
#endif
" wparent = sip_tqt.wrapinstance(parent,qt.TQWidget)\n"
" else:\n"
" wparent = None\n"
" inst = " FACTORY "(wparent, name)\n"
" return (inst,sip.unwrapinstance(inst))\n");
" return (inst,sip_tqt.unwrapinstance(inst))\n");
PyRun_String(bridge.latin1(),Py_file_input,PyModule_GetDict(pyModule),PyModule_GetDict(pyModule));
// Get the Python module's factory function.
@ -994,7 +990,7 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) {
pyTDECModule = PyTuple_GET_ITEM(pyTDECModuleTuple,1);
tdecmodule = (TDECModule *)PyLong_AsVoidPtr(pyTDECModule);
if(!tdecmodule) {
return report_error ("***failed sip conversion to C++ pointer\n");
return report_error ("***failed sip-tqt conversion to C++ pointer\n");
}
pyize->decref(pyTDECModuleTuple);
@ -1609,10 +1605,10 @@ class BuildTdeioslave(Command):
# Sip dir
if self.sip_dir is None:
self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
self.sip_dir = os.path.dirname(FindFileInPaths("sip_tqt*", sys.path))
if self.sip_dir is None:
self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt')
if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None):
self.sip_dir = sysconfig.get_python_lib()
if (FindFileInPaths("libsip_tqt*", [self.sip_dir]) is None) and (FindFileInPaths("sip_tqt*", [self.sip_dir]) is None):
raise SystemExit, "Failed to find libsip files in directory: %s" % self.sip_dir
self.announce("Using %s for libsip files" % self.sip_dir)
@ -1773,13 +1769,13 @@ class BuildTdeioslave(Command):
linklist.extend(sysconfig.get_config_var("LIBS").split())
# FIXME I doubt half of these libraries need to be here.
linklist.append(self.sip_dir+"/sip.so")
linklist.append(self.sip_dir+"/sip_tqt.so")
# PyQt libs
linklist.append(self.pyqt_dir+"/qt.so")
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip_tqt")
# # PyQt libs
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
# # PyTDE libs

Loading…
Cancel
Save