Changes

106 bytes added ,  14:53, 21 December 2016
Page updated to new template
Line 1: Line 1: −
Welcome to Simone Giustetti's wiki pages.
+
{{header_en|title=Building Python-tqt for TDE| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring a working Python-tqt package for TDE and Slackware Linux | link_page=TDE_python-tqt}}
 
  −
 
  −
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_python-tqt Italiano]
  −
 
  −
----
      
== PYTHON-TQT ==
 
== PYTHON-TQT ==
[[En/trinity_desktop_environment#Base_Packages]]
+
[[En/trinity_desktop_environment#Base_Packages | TDE - Base Packages]]
    
'''Python-tqt''' is a library which binds TQT, the customized QT toolkit used by the Trinity Desktop Environement, with '''PtQt''': a set of language bindings for Python and the many functions and objects provided by the QT framework. Python-tqt is needed for building a working '''python-trinity''' package needed in turn for adding the Python language to '''tdebindings'''.
 
'''Python-tqt''' is a library which binds TQT, the customized QT toolkit used by the Trinity Desktop Environement, with '''PtQt''': a set of language bindings for Python and the many functions and objects provided by the QT framework. Python-tqt is needed for building a working '''python-trinity''' package needed in turn for adding the Python language to '''tdebindings'''.
Line 18: Line 13:     
The command line used to configure the source code is:
 
The command line used to configure the source code is:
   '''python''' configure.py \
+
<syntaxhighlight lang="bash">
       ''-b'' /usr/bin \
+
   python configure.py \
       ''-d'' /usr/lib/python2.7/site-packages \
+
       -b /usr/bin \
       ''-l'' /usr/include/python2.7 \
+
       -d /usr/lib/python2.7/site-packages \
 +
       -l /usr/include/python2.7 \
 
       CFLAGS="-O2 -march=i486 -mtune=i686 -L/opt/trinity/lib -I/opt/trinity/include -I/usr/include/tqt -I/usr/lib/qt/include" \
 
       CFLAGS="-O2 -march=i486 -mtune=i686 -L/opt/trinity/lib -I/opt/trinity/include -I/usr/include/tqt -I/usr/lib/qt/include" \
 
       CXXFLAGS="-O2 -march=i486 -mtune=i686 -L/opt/trinity/lib -I/opt/trinity/include -I/usr/include/tqt -I/usr/lib/qt/include"
 
       CXXFLAGS="-O2 -march=i486 -mtune=i686 -L/opt/trinity/lib -I/opt/trinity/include -I/usr/include/tqt -I/usr/lib/qt/include"
 +
</syntaxhighlight>
    
The first configuration attempt produced the following error:
 
The first configuration attempt produced the following error:
Line 50: Line 47:  
   /usr/lib/qt/include/qglobal.h.
 
   /usr/lib/qt/include/qglobal.h.
   −
After some research through the project wiki page and reading the '''configure.py''' script and the '''qglobal.h''' file, I noticed some inconsistencies: The script was looking for variables '''TQT_VERSION''' and '''TQT_VERSION_STR''', but '''QT_VERSION''' and '''QT_VERSION_STR''' could instead be found in the file. This is probably a consequence of being forced to install the QT3 toolkit instead of the TQT one as discussed in the QT3 related page. The configuration script line 1128 was updated:
+
After some research through the project wiki page and reading the '''configure.py''' script and the '''qglobal.h''' file, I noticed some inconsistencies: The script was looking for variables '''TQT_VERSION''' and '''TQT_VERSION_STR''', but '''QT_VERSION''' and '''QT_VERSION_STR''' could instead be found in the file. This is probably a consequence of being forced to install the Qt3 toolkit instead of the TQt one as discussed in the Qt3 related page. The configuration script line 1128 was updated:
 +
<syntaxhighlight lang="bash">
 
   #  qt_version, ignore = sipconfig.read_version(qglobal, "TQt", "TQT_VERSION")
 
   #  qt_version, ignore = sipconfig.read_version(qglobal, "TQt", "TQT_VERSION")
 
       qt_version, ignore = sipconfig.read_version(qglobal, "Qt", "QT_VERSION")
 
       qt_version, ignore = sipconfig.read_version(qglobal, "Qt", "QT_VERSION")
 +
</syntaxhighlight>
    
And the script could go on one step more. Sadly another error showed up:
 
And the script could go on one step more. Sadly another error showed up:
 
   Error: TQt v4.x requires PyTQt v4.x.
 
   Error: TQt v4.x requires PyTQt v4.x.
 
Please note that package '''PyQt-4.9.1-i486-3.txz''' had previously been installed as required by the python-tqt documentation. Removing then reinstalling the package produced no noticeable result to the issue. The '''qglobal.h''' file refers to QT release 4.6, but the Trinity Desktop Environment is built upon release 3 of the toolkit. Updating '''qglobal.h''' lines 47 and 52 as shown below:
 
Please note that package '''PyQt-4.9.1-i486-3.txz''' had previously been installed as required by the python-tqt documentation. Removing then reinstalling the package produced no noticeable result to the issue. The '''qglobal.h''' file refers to QT release 4.6, but the Trinity Desktop Environment is built upon release 3 of the toolkit. Updating '''qglobal.h''' lines 47 and 52 as shown below:
 +
<syntaxhighlight lang="cpp">
 
   //#define QT_VERSION_STR "4.6.2"
 
   //#define QT_VERSION_STR "4.6.2"
 
   #define QT_VERSION_STR "3.5.13"
 
   #define QT_VERSION_STR "3.5.13"
Line 65: Line 65:  
   //#define QT_VERSION 0x040602
 
   //#define QT_VERSION 0x040602
 
   #define QT_VERSION 0x030513
 
   #define QT_VERSION 0x030513
 +
</syntaxhighlight>
    
Got the script going on some more until hitting on a new error born by the lack of some files:
 
Got the script going on some more until hitting on a new error born by the lack of some files:
Line 449: Line 450:  
   make: *** [all] Error 2
 
   make: *** [all] Error 2
   −
seeming related to the TQT '''namespace'''. I was not able to find some documentation about the subject int the TDE wiki page as a consequence it was impossible to built the package. '''Tdebindings wile be built without Python support'''.
+
seeming related to the TQt '''namespace'''. I was not able to find some documentation about the subject int the TDE wiki page as a consequence it was impossible to built the package. '''Tdebindings wile be built without Python support'''.
      Line 456: Line 457:     
External Links
 
External Links
 +
 
----
 
----
 +
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [https://wiki.python.org/moin/PyQt PyQt wiki]
 
* [https://wiki.python.org/moin/PyQt PyQt wiki]
Line 465: Line 468:  
----
 
----
   −
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_python-tqt Italiano]
+
{{footer_en | link_page=TDE_python-tqt}}