summaryrefslogtreecommitdiffstats
path: root/redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch')
-rw-r--r--redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch b/redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch
new file mode 100644
index 000000000..d72fdc928
--- /dev/null
+++ b/redhat/libraries/pytdeextensions/pytdeextensions-14.0.0-fix_extra_module_dir.patch
@@ -0,0 +1,41 @@
+--- pykdeextensions-3.5.13.1/src/kdedistutils.py.extramodule 2012-09-08 17:33:05.000000000 +0000
++++ pykdeextensions-3.5.13.1/src/kdedistutils.py 2012-10-02 19:19:40.185384207 +0000
+@@ -712,6 +712,8 @@
+
+ # Build the 'stub' code.
+ cppcode = self.cpptemplate % {"moduledir": self.data_dir,
++ "extramodule": os.getenv("EXTRA_MODULE_DIR"),
++ "pyqt_dir": self.pyqt_dir,
+ "modulename": modulename,
+ "factoryfunction": factoryfunction,
+ "python_version": python_version}
+@@ -854,6 +856,8 @@
+ #include <sip.h>
+
+ #define MODULE_DIR "%(moduledir)s"
++#define EXTRA_MODULE_DIR "%(extramodule)s"
++#define PYQT_DIR "%(pyqt_dir)s"
+ #define MODULE_NAME "%(modulename)s"
+ #define FACTORY "%(factoryfunction)s"
+ #define CPP_FACTORY %(factoryfunction)s
+--- pykdeextensions-14.0.0/src/kdedistutils.py.ORI 2013-04-07 17:54:28.531813437 +0200
++++ pykdeextensions-14.0.0/src/kdedistutils.py 2013-04-07 17:56:15.510529614 +0200
+@@ -903,6 +907,18 @@
+ if(!pyize->appendToSysPath (path.latin1 ())) {
+ return report_error ("***Failed to set sys.path\n");
+ }
++
++ // Add the extra path to the python script to the interpreter search path.
++ TQString extrapath = TQString(EXTRA_MODULE_DIR);
++ if(!pyize->appendToSysPath (extrapath.latin1 ())) {
++ return report_error ("***Failed to set extra sys.path\n");
++ }
++
++ // Add the PYQT path to the python script to the interpreter search path.
++ TQString pyqt_dir = TQString(PYQT_DIR);
++ if(!pyize->appendToSysPath (pyqt_dir.latin1 ())) {
++ return report_error ("***Failed to set PYQT sys.path\n");
++ }
+
+ // Load the Python script.
+ PyObject *pyModule = pyize->importModule ((char *)script.latin1 ());