Find sip4_tqt and python_tqt modules in all sys.path

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent ec166143c4
commit d8d1f48616

@ -637,6 +637,8 @@ class BuildKControlModule(Command):
self.announce("Using %s for Python header files" % self.python_inc_dir) self.announce("Using %s for Python header files" % self.python_inc_dir)
# PyQt dir # PyQt dir
if self.pyqt_dir is None:
self.pyqt_dir = FindFileInPaths("python_tqt", sys.path)
if self.pyqt_dir is None: if self.pyqt_dir is None:
self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'python_tqt') self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'python_tqt')
if (FindFileInPaths("libqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None): if (FindFileInPaths("libqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
@ -651,6 +653,8 @@ class BuildKControlModule(Command):
self.announce("Using %s for PyTDE modules" % self.pytde_dir) self.announce("Using %s for PyTDE modules" % self.pytde_dir)
# Sip dir # Sip dir
if self.sip_dir is None:
self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
if self.sip_dir is None: if self.sip_dir is None:
self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt') self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt')
if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None): if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None):
@ -1588,6 +1592,8 @@ class BuildTdeioslave(Command):
self.announce("Using %s for Python header files" % self.python_inc_dir) self.announce("Using %s for Python header files" % self.python_inc_dir)
# PyQt dir # PyQt dir
if self.pyqt_dir is None:
self.pyqt_dir = FindFileInPaths("python_tqt", sys.path)
if self.pyqt_dir is None: if self.pyqt_dir is None:
self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'python_tqt') self.pyqt_dir = os.path.join(sysconfig.get_python_lib(), 'python_tqt')
if (FindFileInPaths("libqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None): if (FindFileInPaths("libqtcmodule*",[self.pyqt_dir]) is None) and (FindFileInPaths("qt*",[self.pyqt_dir]) is None):
@ -1602,6 +1608,8 @@ class BuildTdeioslave(Command):
self.announce("Using %s for PyTDE modules" % self.pytde_dir) self.announce("Using %s for PyTDE modules" % self.pytde_dir)
# Sip dir # Sip dir
if self.sip_dir is None:
self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
if self.sip_dir is None: if self.sip_dir is None:
self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt') self.sip_dir = os.path.join(sysconfig.get_python_lib(), 'sip4_tqt')
if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None): if (FindFileInPaths("libsip*", [self.sip_dir]) is None) and (FindFileInPaths("sip*", [self.sip_dir]) is None):

Loading…
Cancel
Save