SIP_MIN_VERSION = '4.18'
-# The different values QLibraryInfo::licensee() can return for the LGPL version
-# of Qt.
-OPEN_SOURCE_LICENSEES = ('Open Source', 'Builder Qt')
-
class ModuleMetadata:
""" This class encapsulates the meta-data about a PyQt5 module. """
self.qml_plugin_dir = ''
self.qsci_api = False
self.qsci_api_dir = ''
- self.qt_licensee = ''
self.qtconf_prefix = ''
self.qt_shared = False
self.qt_version = 0
QTextStream out(&outf);
- out << QLibraryInfo::licensee() << '\\n';
-
#if defined(QT_SHARED) || defined(QT_DLL)
out << "shared\\n";
#else
lines = f.read().split('\n')
f.close()
- self.qt_licensee = lines[0]
- self.qt_shared = (lines[1] == 'shared')
- self.pyqt_disabled_features = lines[2:-1]
+ self.qt_shared = (lines[0] == 'shared')
+ self.pyqt_disabled_features = lines[1:-1]
# Get the details of the Python interpreter library.
py_major = self.py_version >> 16
the target configuration. sip_version is the SIP version string.
"""
- if target_config.qt_licensee == '':
- detail = ''
- elif target_config.qt_licensee in OPEN_SOURCE_LICENSEES:
- detail = " (Open Source)"
- else:
- detail = " licensed to %s" % target_config.qt_licensee
-
- inform("Qt v%s%s is being used." % (
- version_to_string(target_config.qt_version), detail))
+ inform("Qt v%s is being used." %
+ version_to_string(target_config.qt_version))
inform("The qmake executable is %s." % target_config.qmake)
f.close()
-def check_license(target_config, license_confirmed, introspecting):
+def check_license(target_config, license_confirmed):
""" Handle the validation of the PyQt5 license. target_config is the
target configuration. license_confirmed is set if the user has already
- accepted the license. introspecting is set if the configuration is being
- determined by introspection.
+ accepted the license.
"""
try:
(ltype, PYQT_VERSION_STR, lname, sys.version.split()[0],
sys.platform))
- # Common checks.
- if introspecting and target_config.qt_licensee not in OPEN_SOURCE_LICENSEES and ltype == 'GPL':
- error(
- "This version of PyQt5 and the commercial version of Qt have "
- "incompatible licenses.")
-
# Confirm the license if not already done.
if not license_confirmed:
loptions = """
target_config.apply_post_options(opts)
# Check the licenses are compatible.
- check_license(target_config, opts.license_confirmed,
- (opts.config_file is None))
+ check_license(target_config, opts.license_confirmed)
# Check Python is what we need.
check_python(target_config)