Added code to auto-discover the presence of the new 'pyqt5-tools' wheel (Windows only).

Sat, 13 May 2017 13:46:05 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 13 May 2017 13:46:05 +0200
changeset 5735
f606dbe20be6
parent 5734
d8b99b5fa673
child 5736
000ea446ff4b

Added code to auto-discover the presence of the new 'pyqt5-tools' wheel (Windows only).

Globals/__init__.py file | annotate | diff | comparison | revisions
README.rst file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
--- a/Globals/__init__.py	Sat May 13 12:09:45 2017 +0200
+++ b/Globals/__init__.py	Sat May 13 13:46:05 2017 +0200
@@ -236,10 +236,18 @@
             path = os.path.join(modDir, "bin")
         elif os.path.exists(os.path.join(modDir, "designer.exe")):
             path = modDir
+        
+        if not path:
+            # step 2.2: check for the pyqt5-tools wheel (Windows only)
+            import distutils.sysconfig
+            pyqt5ToolsPath = os.path.join(
+                distutils.sysconfig.get_python_lib(True), "pyqt5-tools")
+            if os.path.exists(os.path.join(pyqt5ToolsPath, "designer.exe")):
+                path = pyqt5ToolsPath
     
     if not path:
-        # step 2.2: get the path from Qt
-        # Note: no Qt tools are to found there for PyQt 5.7.0
+        # step 3: get the path from Qt
+        # Note: no Qt tools are to be found there for PyQt 5.7.0
         path = QLibraryInfo.location(QLibraryInfo.BinariesPath)
         if not os.path.exists(path):
             path = ""
--- a/README.rst	Sat May 13 12:09:45 2017 +0200
+++ b/README.rst	Sat May 13 13:46:05 2017 +0200
@@ -56,13 +56,25 @@
 Installing eric6 and its pre-requisites is even easier using the PyQt5 Python
 wheels. In order to have access to the suite of Qt tools and documentation it
 is recommended to install the Qt development environment. These tools are not
-part of the PyQt5 wheels.
+part of the PyQt5 wheels. Users of the Windows® operating system may use the
+'pyqt5-tools' wheel available via the Python Package Index (PyPI) as of
+2017-05-12.
 
+1.2.1 Installation of Qt Tools via Qt online installer
+======================================================
 1. Download the Qt online installer from the Qt download site.
 
 2. Install Qt by executing the installer.
 
-3. Install the eric6 pre-requisites (PyQt, sip and QScintilla) by entering
+1.2.2 Installation of Qt Tools via PyPI
+=======================================
+1. Install the Qt tools by entering this command in a command window::
+   
+        pip install pyqt5-tools
+
+1.2.3 Installation of PyQt5 and eric
+====================================
+1. Install the eric6 pre-requisites (PyQt, sip and QScintilla) by entering
    this command in a shell / command window::
    
         pip install qscintilla
@@ -73,10 +85,10 @@
    
    This will install QScintilla and all dependencies, which are PyQt5 and sip.
 
-4. Install eric6 and configure the path to the Qt tools on the Qt page of the
+2. Install eric6 and configure the path to the Qt tools on the Qt page of the
    configuration dialog.
 
-5. Once the eric6 IDE is started the Qt documentation may be loaded into the
+3. Once the eric6 IDE is started the Qt documentation may be loaded into the
    eric web browser via the ``Settings ➡ Mange Qt Help Documents`` menu entry.
 
 2. Installation of translations
--- a/changelog	Sat May 13 12:09:45 2017 +0200
+++ b/changelog	Sat May 13 13:46:05 2017 +0200
@@ -9,6 +9,9 @@
   -- reintroduced the highlighting of current instruction line and the error
      line using colored background. It is configurable whether to use these
      backgrounds or the arrows.
+- Qt Tools
+  -- added code to auto-discover the presence of the new 'pyqt5-tools' wheel
+     (Windows only) (thanks to Kyle Altendorf for providing this wheel)
 - Web Browser (NG)
   -- united the stop and reload buttons of the navigation bar
 

eric ide

mercurial