Changeset 2698

Show
Ignore:
Timestamp:
06/03/17 04:17:13 (3 years ago)
Author:
jwoithe
Message:

A first pass at optionally supporting PyQt?5 in the build system.

This is an initial implementation of changes in the build system to support
the use of PyQt?5 when building ffado-mixer. They are based on the patch
set submitted to ffado-devel by Xavier Forestier in November 2016. However,
rather than removing PyQt?4 support, the idea is that either PyQt?4 or PyQt?5
can be used.

This patch has been tested on a machine with only PyQt?4 installed. Testing
with only PyQt?5 is yet to be done (the author presently does not have access
to such a system).

It is not known how well this patch will work on a machine with both PyQt?4
and PyQt?5 installed. r2694 assumes that PyQt?4 will be used in this
situation on the basis that it has had the most testing, but it's unclear
whether the build system will select pyuic4 over pyuic5 in this case.
Further testing will be required, and adjustments will be made if problems
are found.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r2650 r2698  
    8989buildenv=os.environ 
    9090 
    91 env = Environment( tools=['default','scanreplace','pyuic','pyuic4','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) 
     91env = Environment( tools=['default','scanreplace','pyuic','pyuic4','pyuic5','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) 
    9292 
    9393custom_flags = False 
     
    394394# PyQT checks 
    395395if env['BUILD_MIXER'] != 'false': 
    396     if conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus' ) and conf.CheckForPyModule( 'PyQt4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' ): 
     396    have_dbus = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' )) 
     397    have_pyqt4 = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'PyQt4' )) 
     398    have_pyqt5 = (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'PyQt5' )) 
     399    if ((have_pyqt4 or have_pyqt5) and have_dbus): 
    397400        env['BUILD_MIXER'] = 'true' 
    398401    elif not env.GetOption('clean'): 
     
    400403            env['BUILD_MIXER'] = 'false' 
    401404            print """ 
    402 The prerequisites ('pyuic4' and the python-modules 'dbus' and 'PyQt4', the 
    403 packages could be named like dbus-python and PyQt) to build the mixer were not 
    404 found. Therefore the qt4 mixer will not be installed.""" 
     405The prerequisites ('pyuic4'/'pyuic5' and the python-modules 'dbus' and  
     406'PyQt4'/'PyQt5', the packages could be named like dbus-python and PyQt) to  
     407build the mixer were not found. Therefore the qt mixer will not be installed.""" 
    405408        else: # env['BUILD_MIXER'] == 'true' 
    406409            print """ 
    407 The prerequisites ('pyuic4' and the python-modules 'dbus' and 'PyQt4', the 
    408 packages could be named like dbus-python and PyQt) to build the mixer were not 
    409 found, but BUILD_MIXER was requested.""" 
     410The prerequisites ('pyuic4'/'pyuic5' and the python-modules 'dbus' and  
     411'PyQt4'/'PyQt5', the packages could be named like dbus-python and PyQt) to  
     412build the mixer were not found, but BUILD_MIXER was requested.""" 
    410413            Exit( 1 ) 
    411414 
  • trunk/libffado/support/tools/ffado-diag-static

    r1821 r2698  
    7676    print "   g++ ............... %s" % get_version_first_line('g++ --version') 
    7777    print "   PyQt4 (by pyuic4) . %s" % get_version_first_line('pyuic4 --version') 
     78    print "   PyQt5 (by pyuic5) . %s" % get_version_first_line('pyuic5 --version') 
    7879    print "   jackd ............. %s" % get_version_first_line('jackd --version') 
    7980    print "     path ............ %s" % get_command_path('jackd') 
  • trunk/libffado/support/tools/ffado-diag.in

    r2302 r2698  
    122122    print "   g++ ............... %s" % get_version_first_line('g++ --version') 
    123123    print "   PyQt4 (by pyuic4) . %s" % get_version_first_line('pyuic4 --version') 
     124    print "   PyQt5 (by pyuic5) . %s" % get_version_first_line('pyuic5 --version') 
    124125    print "   jackd ............. %s" % get_version_first_line('jackd --version') 
    125126    print "     path ............ %s" % get_command_path('jackd')