summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tdedistutils.py34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/tdedistutils.py b/src/tdedistutils.py
index 8ffa6b5..f5e034c 100644
--- a/src/tdedistutils.py
+++ b/src/tdedistutils.py
@@ -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