Changeset 2778

Show
Ignore:
Timestamp:
09/20/19 23:40:01 (1 year ago)
Author:
jwoithe
Message:

v2.4.x branch: merge r2774 to r2777 from trunk.

This merge includes:

r2774: ffado-mixer: don't try loading PyQt?4 if Python3 is in use.
r2775: mixer-qt4: fix for building with scons under python 3.
r2776: SConstruct: Support Hygon Dhyana x86 vendor id (HygonGenuine?).
r2777: SConstruct: revise for recent python3 environments.

These represent all changes made to trunk since FFADO version 2.4.1 was
released. Being mainly bug fixes, they are all suitable for inclusion in
version 2.4.2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.4.x/libffado/SConstruct

    r2772 r2778  
    610610                            ('970' in self.ppc_type or 'power8' in self.ppc_type.lower())) 
    611611 
    612         # Hardware virtualization capable: vmx (Intel), svm (AMD
     612        # Hardware virtualization capable: vmx (Intel), svm (AMD, Hygon
    613613        self.has_hwvirt = self.is_x86 and ( 
    614                             (self.is_amd and 'svm' in self.x86_flags) or 
     614                            ((self.is_amd or self.is_hygon) and  
     615                                'svm' in self.x86_flags) or 
    615616                            (self.is_intel and 'vmx' in self.x86_flags)) 
    616617 
     
    628629                    # parse all of them 
    629630                    continue 
    630             elif k == 'vendor_id': # AuthenticAMD, GenuineIntel 
     631            elif k == 'vendor_id': # AuthenticAMD, HygonGenuine, GenuineIntel 
    631632                self.vendor_id = v 
    632633                self.is_amd = v == 'AuthenticAMD' 
     634                self.is_hygon = v == 'HygonGenuine' 
    633635                self.is_intel = v == 'GenuineIntel' 
    634636            elif k == 'flags': 
     
    720722        # or like this: 
    721723        # /bin/mount:     file format elf32-powerpc 
    722         for line in x.split(b'\n'): 
    723             line = line.strip().decode() 
     724        for line in x.split('\n'): 
     725            line = line.strip() 
    724726            if line.startswith(real_exe): 
    725727                x, fmt = line.rsplit(None, 1) 
  • branches/2.4.x/libffado/support/mixer-qt4/ffado/import_pyqt.py

    r2696 r2778  
    2121# 
    2222 
    23 ffado_pyqt_version = 4 
    24  
    25 # This module handles the importing of PyQt modules for both PyQt4 and PyQt5. 
    26 # The idea is to first try importing PyQt4.  If there's an import error it's 
    27 # assumed PyQt5 is present instead and that is tried. 
     23# This module handles the importing of PyQt modules for both PyQt4 and PyQt5 
     24# under Python2 or Python3.  If Python3 is installed it is assumed that 
     25# PyQt5 is in use (this is reasonable because PyQt5 is what everyone wants 
     26# to use under Python3).  Otherwise (that is, under Python2), an import of 
     27# PyQt4 is tried first; if an import error occurs then PyQt5 is assumed. 
    2828# 
    2929# All modules used by any part of ffado-mixer are imported.  This greatly 
     
    3131# by string variables, and there isn't a supported way to do this across  
    3232# Python2 and Python3. 
    33 try: 
     33 
     34import sys 
     35ffado_python3 = sys.version_info >= (3,) 
     36 
     37if ffado_python3: 
     38    ffado_pyqt_version = 5 
     39else: 
     40    try: 
     41        from PyQt4 import QtGui 
     42        ffado_pyqt_version = 4 
     43    except ImportError: 
     44        ffado_pyqt_version = 5 
     45 
     46if ffado_pyqt_version == 4: 
    3447    from PyQt4 import QtGui, QtCore, Qt, uic 
    3548    from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot 
    3649    from PyQt4.QtGui import * 
    37     ffado_pyqt_version = 4 
    38 except ImportError: 
     50else: 
    3951    from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic 
    4052    from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt 
    4153    from PyQt5.QtGui import * 
    4254    from PyQt5.QtWidgets import * 
    43     ffado_pyqt_version = 5 
    44  
    45 import sys 
    46 ffado_python3 = sys.version_info >= (3,) 
  • branches/2.4.x/libffado/support/mixer-qt4/SConscript

    r2588 r2778  
    3030    e = env.Clone() 
    3131 
    32     def findfiles( arg, dirname, names ): 
    33         for name in names: 
    34             if name.startswith("."): 
    35                 names.remove(name) 
    36         for name in names: 
    37             if '.pyc' not in name and '.in' not in name: 
    38                 arg.append( os.path.join( dirname, name ) ) 
    39  
    4032    pythonfiles = [ 'ffado/config.py' ] 
    41     os.path.walk( "ffado", findfiles, pythonfiles ) 
     33    for root, dirs, files in os.walk( "ffado" ): 
     34        for name in files: 
     35            if name.endswith( '.pyc' ) or '.in' in name or name.startswith("."): 
     36                continue 
     37            pythonfiles.append( os.path.join( root, name ) ) 
    4238 
    4339    e.ScanReplace( "ffado/config.py.in" )