diff options
author | Slávek Banko <[email protected]> | 2016-09-28 19:23:30 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-09-28 19:23:30 +0200 |
commit | ec166143c498b91a7f0943493fdc958dae17ae5c (patch) | |
tree | 9d525a1ed2995d6b09a7a38d6434bf797d9d3fb5 | |
parent | 4d065d1c64dc63893092f3f14ae231c8f16f155b (diff) | |
download | pytdeextensions-ec166143c498b91a7f0943493fdc958dae17ae5c.tar.gz pytdeextensions-ec166143c498b91a7f0943493fdc958dae17ae5c.zip |
Properly import python_tqt module
Signed-off-by: Slávek Banko <[email protected]>
-rwxr-xr-x | app_templates/kcontrol_module/src/kcontrol_module.py | 2 | ||||
-rwxr-xr-x | app_templates/kdeapp/src/kdeapp.py | 2 | ||||
-rw-r--r-- | app_templates/kdeapp/src/kdeappview.py | 2 | ||||
-rw-r--r-- | app_templates/kdeapp/src/prefdialog.py | 2 | ||||
-rwxr-xr-x | app_templates/kdeutility/src/kdeutility.py | 2 | ||||
-rwxr-xr-x | app_templates/tdeioslave/src/tdeioslave.py | 2 | ||||
-rw-r--r-- | src/qtuicompiler.py | 2 | ||||
-rw-r--r-- | src/tdedistutils.py | 22 |
8 files changed, 8 insertions, 28 deletions
diff --git a/app_templates/kcontrol_module/src/kcontrol_module.py b/app_templates/kcontrol_module/src/kcontrol_module.py index 67e1573..5dc5ed9 100755 --- a/app_templates/kcontrol_module/src/kcontrol_module.py +++ b/app_templates/kcontrol_module/src/kcontrol_module.py @@ -16,7 +16,7 @@ ########################################################################### import sys -from qt import * +from python_tqt.qt import * from tdecore import * from tdeui import * diff --git a/app_templates/kdeapp/src/kdeapp.py b/app_templates/kdeapp/src/kdeapp.py index bd83a66..11ca1d1 100755 --- a/app_templates/kdeapp/src/kdeapp.py +++ b/app_templates/kdeapp/src/kdeapp.py @@ -15,7 +15,7 @@ # # ########################################################################### -from qt import * +from python_tqt.qt import * from tdecore import * from tdeui import * import sys diff --git a/app_templates/kdeapp/src/kdeappview.py b/app_templates/kdeapp/src/kdeappview.py index 3ebffe4..c20fa84 100644 --- a/app_templates/kdeapp/src/kdeappview.py +++ b/app_templates/kdeapp/src/kdeappview.py @@ -15,7 +15,7 @@ # # ########################################################################### -from qt import * +from python_tqt.qt import * from tdecore import * from tdeui import * from tdeio import * diff --git a/app_templates/kdeapp/src/prefdialog.py b/app_templates/kdeapp/src/prefdialog.py index 0a6c96a..c13d6c6 100644 --- a/app_templates/kdeapp/src/prefdialog.py +++ b/app_templates/kdeapp/src/prefdialog.py @@ -15,7 +15,7 @@ # # ########################################################################### -from qt import * +from python_tqt.qt import * from tdecore import * from tdeui import * diff --git a/app_templates/kdeutility/src/kdeutility.py b/app_templates/kdeutility/src/kdeutility.py index 58b9585..4672109 100755 --- a/app_templates/kdeutility/src/kdeutility.py +++ b/app_templates/kdeutility/src/kdeutility.py @@ -16,7 +16,7 @@ ########################################################################### import sys -from qt import * +from python_tqt.qt import * from tdecore import * from tdeui import * import tdedesigner diff --git a/app_templates/tdeioslave/src/tdeioslave.py b/app_templates/tdeioslave/src/tdeioslave.py index 0dd8b8d..6fe7602 100755 --- a/app_templates/tdeioslave/src/tdeioslave.py +++ b/app_templates/tdeioslave/src/tdeioslave.py @@ -16,7 +16,7 @@ ########################################################################### # Import the required Qt and KDE modules. -from qt import * +from python_tqt.qt import * from tdeio import * from tdecore import * import os, time diff --git a/src/qtuicompiler.py b/src/qtuicompiler.py index b08e79c..7e196df 100644 --- a/src/qtuicompiler.py +++ b/src/qtuicompiler.py @@ -59,7 +59,7 @@ def CompileUI(ui_file_name, py_file_name=None, kde=False): input = open(tmp_file_name, 'r') output = open(py_file_name, 'w') for line in input.readlines(): - if kde and string.strip(line) == 'from qt import *': + if kde and string.strip(line) == 'from python_tqt.qt import *': output.write(line) output.write('from tdecore import *\nfrom tdeui import *\n\n') elif kde and string.find(line, " = KDatePicker(") != -1: diff --git a/src/tdedistutils.py b/src/tdedistutils.py index a0f7971..9515010 100644 --- a/src/tdedistutils.py +++ b/src/tdedistutils.py @@ -39,18 +39,6 @@ from types import StringType INSTALL_LIST = 'install_log.txt' -# Trinity-specific paths -tqt_modules = [] -for m_path in sys.path: - if os.path.exists(os.path.join(m_path, 'sip4_tqt')): - m_sip_dir = os.path.join(m_path, 'sip4_tqt') - tqt_modules.insert(0, m_sip_dir) - if os.path.exists(os.path.join(m_path, 'python_tqt')): - m_pyqt_dir = os.path.join(m_path, 'python_tqt') - tqt_modules.insert(0, m_pyqt_dir) -for m_path in tqt_modules: - sys.path.insert(0, m_path) - ########################################################################### def setup(**arg_dict): @@ -650,8 +638,6 @@ class BuildKControlModule(Command): # PyQt dir if self.pyqt_dir is None: - self.pyqt_dir = m_pyqt_dir - 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 @@ -666,8 +652,6 @@ class BuildKControlModule(Command): # Sip dir if self.sip_dir is None: - self.sip_dir = m_sip_dir - 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 @@ -1605,8 +1589,6 @@ class BuildTdeioslave(Command): # PyQt dir if self.pyqt_dir is None: - self.pyqt_dir = m_pyqt_dir - 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 @@ -1621,8 +1603,6 @@ class BuildTdeioslave(Command): # Sip dir if self.sip_dir is None: - self.sip_dir = m_sip_dir - 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 @@ -2049,7 +2029,7 @@ class CheckPyQt(Command): self.announce("Found Qt version %s." % qtver) try: self.announce("Checking for a working PyQt...") - import qt + from python_tqt import qt self.announce(" ...PyQt is working") except: raise SystemExit, "Couldn't import Qt! Please make sure that PyQt is installed and working." |