Tue, 23 Apr 2013 19:57:07 +0200
Changed the logic for detecting and using the PyQt4 module directory.
--- a/APIs/Python3/eric5.api Tue Apr 23 19:13:45 2013 +0200 +++ b/APIs/Python3/eric5.api Tue Apr 23 19:57:07 2013 +0200 @@ -1749,6 +1749,7 @@ eric5.Globals.configDir?7 eric5.Globals.findPython2Interpreters?4() eric5.Globals.getConfigDir?4() +eric5.Globals.getPyQt4ModulesDirectory?4() eric5.Globals.getPythonModulesDirectory?4() eric5.Globals.isLinuxPlatform?4() eric5.Globals.isMacPlatform?4()
--- a/Documentation/Help/source.qhp Tue Apr 23 19:13:45 2013 +0200 +++ b/Documentation/Help/source.qhp Tue Apr 23 19:57:07 2013 +0200 @@ -12506,6 +12506,7 @@ <keyword name="getProject" id="getProject" ref="eric5.Preferences.__init__.html#getProject" /> <keyword name="getProjectBrowserColour" id="getProjectBrowserColour" ref="eric5.Preferences.__init__.html#getProjectBrowserColour" /> <keyword name="getProjectBrowserFlags" id="getProjectBrowserFlags" ref="eric5.Preferences.__init__.html#getProjectBrowserFlags" /> + <keyword name="getPyQt4ModulesDirectory" id="getPyQt4ModulesDirectory" ref="eric5.Globals.__init__.html#getPyQt4ModulesDirectory" /> <keyword name="getPython" id="getPython" ref="eric5.Preferences.__init__.html#getPython" /> <keyword name="getPythonLibPath" id="getPythonLibPath" ref="eric5.Utilities.__init__.html#getPythonLibPath" /> <keyword name="getPythonModulesDirectory" id="getPythonModulesDirectory" ref="eric5.Globals.__init__.html#getPythonModulesDirectory" />
--- a/Documentation/Source/eric5.Globals.__init__.html Tue Apr 23 19:13:45 2013 +0200 +++ b/Documentation/Source/eric5.Globals.__init__.html Tue Apr 23 19:57:07 2013 +0200 @@ -43,6 +43,9 @@ <td><a href="#getConfigDir">getConfigDir</a></td> <td>Module function to get the name of the directory storing the config data.</td> </tr><tr> +<td><a href="#getPyQt4ModulesDirectory">getPyQt4ModulesDirectory</a></td> +<td>Function to determine the path to PyQt4's modules directory.</td> +</tr><tr> <td><a href="#getPythonModulesDirectory">getPythonModulesDirectory</a></td> <td>Function to determine the path to Python's modules directory.</td> </tr><tr> @@ -99,6 +102,19 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> +<a NAME="getPyQt4ModulesDirectory" ID="getPyQt4ModulesDirectory"></a> +<h2>getPyQt4ModulesDirectory</h2> +<b>getPyQt4ModulesDirectory</b>(<i></i>) +<p> + Function to determine the path to PyQt4's modules directory. +</p><dl> +<dt>Returns:</dt> +<dd> +path to the PyQt4 modules directory (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> <a NAME="getPythonModulesDirectory" ID="getPythonModulesDirectory"></a> <h2>getPythonModulesDirectory</h2> <b>getPythonModulesDirectory</b>(<i></i>)
--- a/Globals/__init__.py Tue Apr 23 19:13:45 2013 +0200 +++ b/Globals/__init__.py Tue Apr 23 19:57:07 2013 +0200 @@ -153,6 +153,16 @@ """ import distutils.sysconfig return distutils.sysconfig.get_python_lib(True) + + +def getPyQt4ModulesDirectory(): + """ + Function to determine the path to PyQt4's modules directory. + + @return path to the PyQt4 modules directory (string) + """ + import distutils.sysconfig + return os.path.join(distutils.sysconfig.get_python_lib(True), "PyQt4") ################################################################################
--- a/Preferences/__init__.py Tue Apr 23 19:13:45 2013 +0200 +++ b/Preferences/__init__.py Tue Apr 23 19:57:07 2013 +0200 @@ -33,7 +33,7 @@ from E5Network.E5Ftp import E5FtpProxyType from Globals import settingsNameOrganization, settingsNameGlobal, settingsNameRecent, \ - isWindowsPlatform, findPython2Interpreters, getPythonModulesDirectory + isWindowsPlatform, findPython2Interpreters, getPyQt4ModulesDirectory from Project.ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \ ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \ @@ -2332,8 +2332,7 @@ if s == "": s = QLibraryInfo.location(QLibraryInfo.TranslationsPath) if s == "" and isWindowsPlatform(): - transPath = os.path.join(getPythonModulesDirectory(), - "PyQt4", "translations") + transPath = os.path.join(getPyQt4ModulesDirectory(), "translations") if os.path.exists(transPath): s = transPath return s
--- a/QScintilla/APIsManager.py Tue Apr 23 19:13:45 2013 +0200 +++ b/QScintilla/APIsManager.py Tue Apr 23 19:57:07 2013 +0200 @@ -14,7 +14,7 @@ from . import Lexers import Preferences -import Utilities +import Globals class APIs(QObject): @@ -165,9 +165,8 @@ @return list of installed API files (list of strings) """ if self.__apis is not None: - if Utilities.isWindowsPlatform(): - qsciPath = os.path.join(Utilities.getPythonModulesDirectory(), - "PyQt4", "qsci") + if Globals.isWindowsPlatform(): + qsciPath = os.path.join(Globals.getPyQt4ModulesDirectory(), "qsci") if os.path.exists(qsciPath): # it's the installer apidir = os.path.join(qsciPath, "api", self.__lexer.lexer())
--- a/Toolbox/Startup.py Tue Apr 23 19:13:45 2013 +0200 +++ b/Toolbox/Startup.py Tue Apr 23 19:57:07 2013 +0200 @@ -131,7 +131,7 @@ Module function to set the Qt library paths correctly for windows systems. """ if Globals.isWindowsPlatform(): - libPath = os.path.join(Globals.getPythonModulesDirectory(), "PyQt4", "plugins") + libPath = os.path.join(Globals.getPyQt4ModulesDirectory(), "plugins") if os.path.exists(libPath): libPath = QDir.fromNativeSeparators(libPath) libraryPaths = QApplication.libraryPaths()
--- a/Utilities/__init__.py Tue Apr 23 19:13:45 2013 +0200 +++ b/Utilities/__init__.py Tue Apr 23 19:57:07 2013 +0200 @@ -44,7 +44,7 @@ from Globals import isWindowsPlatform, isLinuxPlatform, isMacPlatform # __IGNORE_WARNING__ from Globals import getConfigDir, setConfigDir # __IGNORE_WARNING__ -from Globals import getPythonModulesDirectory # __IGNORE_WARNING__ +from Globals import getPythonModulesDirectory, getPyQt4ModulesDirectory # __IGNORE_WARNING__ # import these methods into the Utilities namespace from E5Gui.E5Application import e5App
--- a/eric5.py Tue Apr 23 19:13:45 2013 +0200 +++ b/eric5.py Tue Apr 23 19:57:07 2013 +0200 @@ -208,7 +208,7 @@ # modify the executable search path for the PyQt4 installer if Globals.isWindowsPlatform(): - pyqtDataDir = os.path.join(Globals.getPythonModulesDirectory(), "PyQt4") + pyqtDataDir = Globals.getPyQt4ModulesDirectory() if os.path.exists(os.path.join(pyqtDataDir, "bin")): path = os.path.join(pyqtDataDir, "bin") + os.pathsep + os.environ["PATH"] else: