| Summary: | Build issue: tde-guidance can not work | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Slávek Banko <slavek.banko> |
| Component: | non-core programs | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | NEEDINFO --- | ||
| Severity: | major | CC: | albator78, bugwatch, darrella |
| Priority: | P5 | ||
| Version: | 3.5.13.x [Trinity] | ||
| Hardware: | All | ||
| OS: | Debian Squeeze | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2968 | ||
| Attachments: |
pykdeextensions 3.5.13.2 : fix include directory for Trinity
pykdeextensions 3.5.13.2 : adds EXTRA_MODULE_DIR and PYQT_DIR variables in KCM code template |
||
|
Description
Slávek Banko
2012-08-27 13:31:46 CDT
According to the "rules" files, many python files are copied from /opt/trinity/share/ to /usr/lib/pythonXXX/ , which is mandatory for python to find them. Then, some of them are linked in /opt/trinity/bin to /usr/lib/pythonXX/... This is on purpose. What is your problem exactly ? Are the symlinks dead or not working ? In the debian package are python files installed in /opt/trinity/share/python-support. But symlinks in /opt/trinity/bin point to /usr/share/python-support ==> symlinks are unresolved.
KCM module reports errors to .xsession-errors:
Pythonize constructor -- pid = 5023
Python interpreter initialized!
Pythonize constructor -- pid = 5023
Traceback (most recent call last):
File "/opt/trinity/share/python-support/kde-guidance-trinity/mountconfig.py", line 19, in <module>
from qt import *
ImportError: /usr/lib/pymodules/python2.6/qt.so: undefined symbol: PyExc_NameError
I tried to move folders from /opt/trinity/python-support to /usr/share/python-support. After this kde-guidance programs called from the command line works. But KCM modules still do not work. Still with the same error message - only with changed path - for example "/usr/lib/pymodules/python2.6/wineconfig.py". Is this problem still valid? The "guidance" package, and its requirements (pykdeextensions) are hard to build. As you found, there are 2 ways of running the guidance tools: - As an application directly - As a KCM module Running as application is made possible by packaging the correct way, e.g. moving the .py files in the correct folders and/or setting environment variables such as PYTHONPATH. Apparently you've managed to make it work so no need to detail more here. But, currently on 3.5.13.2, I have no way of making KCM work with guidance. This is because the required hack using "EXTRA_MODULES_DIR" variable was removed, but apparently no other hack was done instead. I will post the 2 patches I have to use in pykdeextensions 3.5.13.2 to make KCM work. Created attachment 1165 [details]
pykdeextensions 3.5.13.2 : fix include directory for Trinity
Created attachment 1166 [details]
pykdeextensions 3.5.13.2 : adds EXTRA_MODULE_DIR and PYQT_DIR variables in KCM code template
The EXTRA_MODULE_DIR variable sucks, because it must be set at build time.
E.g, you must, in order:
1) patch, rebuild and reinstall pykdeextensions.
2) set variable EXTRA_MODULE_DIR, then rebuild Guidance.
E.g (adapt to your distro):
export EXTRA_MODULE_DIR=/usr/lib/python2.6/kde-guidance
Then build and install Guidance tools.
./setup.py ...
The problem occurs because Guidance scripts/libraries are installed under a non-standard Python directory (/usr/lib/python2.6/kde-guidance) and Python script invoked by C++ code cannot find them by default.
(It would work without hack if we installed directory under standard directory /usr/lib/python2.6 ).
The attached patch simply adds and hard-codes the "/usr/lib/python2.6/kde-guidance" (or anything you set at build time in EXTRA_MODULES_DIR) in the C++ code generated for KCM modules.
(It also harcodes the "python-qt.so" library path because it is also in nonstandard path under some distros, but this is done automatically without environment variable)
|