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

Loading…
Cancel
Save