summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-09-29 09:33:47 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-09-29 09:33:47 +0200
commitd8d1f4861616f1ae1ce7eb38452be8f9edbc266e (patch)
tree1df1baacd65586cbdd85734343f6b0f8c6740d39
parentec166143c498b91a7f0943493fdc958dae17ae5c (diff)
downloadpytdeextensions-d8d1f4861616f1ae1ce7eb38452be8f9edbc266e.tar.gz
pytdeextensions-d8d1f4861616f1ae1ce7eb38452be8f9edbc266e.zip
Find sip4_tqt and python_tqt modules in all sys.path
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--src/tdedistutils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tdedistutils.py b/src/tdedistutils.py
index 9515010..fa14021 100644
--- a/src/tdedistutils.py
+++ b/src/tdedistutils.py
@@ -638,6 +638,8 @@ class BuildKControlModule(Command):
# PyQt dir
if self.pyqt_dir is None:
+ self.pyqt_dir = FindFileInPaths("python_tqt", sys.path)
+ if self.pyqt_dir is None:
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):
raise SystemExit, "Failed to find the PyQt directory: %s" % self.pyqt_dir
@@ -652,6 +654,8 @@ class BuildKControlModule(Command):
# Sip dir
if self.sip_dir is None:
+ self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
+ if self.sip_dir is None:
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):
raise SystemExit, "Failed to find libsip files in directory: %s" % self.sip_dir
@@ -1589,6 +1593,8 @@ class BuildTdeioslave(Command):
# PyQt dir
if self.pyqt_dir is None:
+ self.pyqt_dir = FindFileInPaths("python_tqt", sys.path)
+ if self.pyqt_dir is None:
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):
raise SystemExit, "Failed to find the PyQt directory: %s" % self.pyqt_dir
@@ -1603,6 +1609,8 @@ class BuildTdeioslave(Command):
# Sip dir
if self.sip_dir is None:
+ self.sip_dir = FindFileInPaths("sip4_tqt", sys.path)
+ if self.sip_dir is None:
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):
raise SystemExit, "Failed to find libsip files in directory: %s" % self.sip_dir