This commit is contained in:
Kovid Goyal 2017-01-24 07:12:46 +05:30
commit 86f5bb8c6d

View File

@ -14,9 +14,11 @@ isunix = islinux or isosx or isbsd
py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2]) py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2])
def absolutize(paths): def absolutize(paths):
return list(set([x if os.path.isabs(x) else os.path.join(SRC, x.replace('/', os.sep)) for x in paths])) return list(set([x if os.path.isabs(x) else os.path.join(SRC, x.replace('/', os.sep)) for x in paths]))
class Extension(object): class Extension(object):
def __init__(self, name, sources, **kwargs): def __init__(self, name, sources, **kwargs):
@ -83,11 +85,13 @@ def is_ext_allowed(ext):
return q in only return q in only
return True return True
def parse_extension(ext): def parse_extension(ext):
ext = ext.copy() ext = ext.copy()
ext.pop('only', None) ext.pop('only', None)
kw = {} kw = {}
name = ext.pop('name') name = ext.pop('name')
def get(k, default=''): def get(k, default=''):
ans = ext.pop(k, default) ans = ext.pop(k, default)
if iswindows: if iswindows:
@ -361,7 +365,12 @@ class Build(Command):
PLUGIN_TYPE = platforms PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = HeadlessIntegrationPlugin PLUGIN_CLASS_NAME = HeadlessIntegrationPlugin
load(qt_plugin) load(qt_plugin)
QT += core-private gui-private platformsupport-private QT += core-private gui-private
greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 7): {{
QT += theme_support-private
}} else {{
QT += platformsupport-private
}}
HEADERS = {headers} HEADERS = {headers}
SOURCES = {sources} SOURCES = {sources}
OTHER_FILES = {others} OTHER_FILES = {others}
@ -400,6 +409,7 @@ class Build(Command):
self.check_call(cmd) self.check_call(cmd)
self.info('') self.info('')
raw = open(sbf, 'rb').read().decode('utf-8') raw = open(sbf, 'rb').read().decode('utf-8')
def read(x): def read(x):
ans = re.search('^%s\s*=\s*(.+)$' % x, raw, flags=re.M).group(1).strip() ans = re.search('^%s\s*=\s*(.+)$' % x, raw, flags=re.M).group(1).strip()
if x != 'target': if x != 'target':