[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Installing multiple versions of PyQt
From:       Detlev Offenbach <detlev () die-offenbachs ! de>
Date:       2015-05-23 10:58:01
Message-ID: 2805668.th29R55arm () saturn
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

it is like shown below.

1. Compile and install Qt. That creates an installation directory (e.g. 
/usr/local/Trolltech/Qt-4.x.y or /usr/local/Qt-5.x.y).
2. Compile the QScintilla C++ part for each Qt installation
3. Have a virtualenv for the relevant Python/Qt combination (note PyQt4 and PyQt5 can be 
installed in parallel).
4. Compile PyQt with something like

export PATH=/usr/local/Qt-5.4/bin:~/py3qt50env/bin:$PATH

~/py3qt50env/bin/python configure.py -b ~/py3qt50env/bin/ -v ~/py3qt50env/pyqt5sip -c -j8  --
confirm-license
(all on one line)

Detlev

On Friday 22 May 2015, 09:07:44 Florian Bruhin wrote:
> * Detlev Offenbach <detlev@die-offenbachs.de> [2015-05-20 19:31:12 +0200]:
> > On Wednesday 20 May 2015, 10:45:28 Giuseppe Corbelli wrote:
> > > On 20/05/2015 09:45, Florian Bruhin wrote:
> > > >>> - Use some kind of containers/chroots instead of VMs.
> > > >> 
> > > >> Virtualenv?
> > > > 
> > > > That'd basically be my second idea (multiple installs on the same
> > > > system). However that still means I'll have to manage multiple Qt
> > > > installs (and multiple PyQt installs which each use the right Qt) on
> > > > the same system, which might be hard.
> > > 
> > > Never tried what I'm talking about but if you just install qt4 and qt5
> > > systemwide and have different virtualenvs for pyqt4 (its own sip) and
> > > pyqt5
> > > (its own sip) it should not be a PITA.
> > 
> > That is exactly the kind of setup I am using to test eric (my Python IDE)
> > with various (but not all) combinations of Qt, PyQt and Python. I needed
> > it because eric is compatible with Python2 and 3 and PyQt4/Qt4, PyQt4/Qt5
> > and PyQt5/Qt5.
> 
> Nice! Could you elaborate a bit on how you set this up? Is it
> essentially something like this?
> 
> - Compile multiple versions of Qt with -developer-build.
> - Compile PyQt for each with --qmake=/path/to/qt/bin/qmake
> - Symlink the libraries in a virtualenv each (or adjust PYTHONPATH
>   accordingly)
> 
> Florian-- 
*Detlev Offenbach*
detlev@die-offenbachs.de

[Attachment #5 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; \
font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hi,</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">it is like shown below.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">1. Compile and \
install Qt. That creates an installation directory (e.g. /usr/local/Trolltech/Qt-4.x.y or \
/usr/local/Qt-5.x.y).</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">2. Compile the \
QScintilla C++ part for each Qt installation</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">3. \
Have a virtualenv for the relevant Python/Qt combination (note PyQt4 and PyQt5 can be installed \
in parallel).</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">4. Compile PyQt with \
something like</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">export \
PATH=/usr/local/Qt-5.4/bin:~/py3qt50env/bin:$PATH</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">~/py3qt50env/bin/python configure.py -b ~/py3qt50env/bin/ -v \
~/py3qt50env/pyqt5sip -c -j8  --confirm-license</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">(all on one line)</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Detlev</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On Friday 22 May 2015, 09:07:44 Florian Bruhin wrote:</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; * Detlev Offenbach &lt;detlev@die-offenbachs.de&gt; \
[2015-05-20 19:31:12 +0200]:</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; On \
Wednesday 20 May 2015, 10:45:28 Giuseppe Corbelli wrote:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; &gt; On 20/05/2015 09:45, Florian Bruhin wrote:</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; &gt;&gt;&gt; - Use some kind of \
containers/chroots instead of VMs.</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
&gt; &gt; &gt;&gt; </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; \
&gt;&gt; Virtualenv?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; &gt; \
</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; &gt; That'd basically be \
my second idea (multiple installs on the same</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
&gt; &gt; &gt; system). However that still means I'll have to manage multiple Qt</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; &gt; installs (and multiple PyQt installs \
which each use the right Qt) on</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
&gt; &gt; &gt; the same system, which might be hard.</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; &gt; </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
&gt; &gt; Never tried what I'm talking about but if you just install qt4 and qt5</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; systemwide and have different virtualenvs \
for pyqt4 (its own sip) and</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; \
pyqt5</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; &gt; (its own sip) it should \
not be a PITA.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; </p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; That is exactly the kind of \
setup I am using to test eric (my Python IDE)</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
&gt; with various (but not all) combinations of Qt, PyQt and Python. I needed</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; it because eric is compatible with Python2 and 3 \
and PyQt4/Qt4, PyQt4/Qt5</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; and \
PyQt5/Qt5.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; Nice! Could you elaborate a bit on how you set this up? Is it</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; essentially something like \
this?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; - Compile multiple versions of Qt with -developer-build.</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; - Compile PyQt for each with \
--qmake=/path/to/qt/bin/qmake</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
- Symlink the libraries in a virtualenv each (or adjust PYTHONPATH</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt;   accordingly)</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; Florian<br />-- \
</p> <p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-size:0.92em; \
font-weight:600;">Detlev Offenbach</span></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">detlev@die-offenbachs.de</p></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic