[PySide] BuildScripts for Python 3 (Was: from PySide import * in Python2/3)

anatoly techtonik techtonik at gmail.com
Wed Feb 29 08:59:45 CET 2012


On Tue, Feb 21, 2012 at 7:49 PM, Thomas Perl <th.perl at gmail.com> wrote:
> 2012/2/21 anatoly techtonik <techtonik at gmail.com>:
>> It seems that there is a problem with build scripts at
>> https://github.com/PySide/BuildScripts/blob/master/README (see below)
>> How to fix them to building PySide for Python 3 properly?
>
> I've now pushed an update to the BuildScripts Git repository:
>
>   https://github.com/PySide/BuildScripts

Thanks. I can even say how much time it could take to do it myself. =)

> This includes support for building PySide for Python 3. You have to
> edit the environment.sh file and uncomment one line. PySide for Python
> 3 will be installed in a different directory, so that you can easily
> switch between it and PySide for Python 2 - simply edit the
> environment.sh and then "source" it in your shell.

Is it possible to provide Python 2 and Python 3 bindings
simultaneously? 2 and 3 peacefully coexist in Linux, so why isn't it
possible to use both? Editing environment.sh every time is bothersome.

To me a better interface are SKIP_PYTHON3 / SKIP_PYTHON2 options in
environment.sh

Ideally build scripts should also detect if Python 3 is present before
attempt to compile it.

> See the updated README file for more detailed instructions on how to
> build for Python 3.

With the default behaviour above, the amount of text there can be reduced. =)

> Please also note that pyside-tools and mobility are not yet able to
> utilize/find Python 3 from the CMake scripts, I've filed two bugs:
>
> http://bugs.pyside.org/show_bug.cgi?id=1148
> http://bugs.pyside.org/show_bug.cgi?id=1149

Unfortunately, PySide doesn't compile anymore even with Python 2.

CMake Error at cmake/Modules/FindQtMobility.cmake:52 (message):
  Couldn't find any version of QtMobility.

That's a bad default to require QtMobility installed. Ideally, build
scripts should detect its presence, but for a quick fix I'd move all
QtMobility stuff into separate README chapter and instead of requiring
everybody to type "./build_and_install apiextractor generatorrunner
shiboken pyside", provided an instructions just for those who needs
QtMobility to type "./build_and_install qtmobility"
--
anatoly t.



More information about the PySide mailing list