From efb21334cc71e1b2a3f204049c10bd76b796f098 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Mon, 4 Jan 2016 15:51:40 +0100
Subject: [PATCH] update windows instructions: windows command shell has no
 globs

---
 content/install.rst | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/content/install.rst b/content/install.rst
index d2df391..881519a 100644
--- a/content/install.rst
+++ b/content/install.rst
@@ -302,20 +302,36 @@ provided by Christoph Gohlke.  To install Kwant on Windows
 5. Reboot your computer.
 
 6. Download the necessary packages (with the ending ``.whl``) for your
-   operating system (32 or 64 bit) and Python version (e.g. ``cp34`` for Python
-   3.4) from the website of `Christoph Gohlke
-   <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_.  For Kwant, we recommend to download at least `NumPy <http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`_, `SciPy <http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy>`_, `Matplotlib <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>`_, `Nose <http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose>`_, `Tinyarray <http://www.lfd.uci.edu/~gohlke/pythonlibs/#tinyarray>`_, and `Kwant <http://www.lfd.uci.edu/~gohlke/pythonlibs/#kwant>`_ itself.
+   operating system (32 or 64 bit) and Python version (e.g. ``cp34`` for
+   Python 3.4) from the website of `Christoph Gohlke
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_.  For Kwant, we recommend to
+   download at least `NumPy
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`_, `SciPy
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy>`_, `Matplotlib
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>`_, `Nose
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose>`_, `Tinyarray
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#tinyarray>`_, and `Kwant
+   <http://www.lfd.uci.edu/~gohlke/pythonlibs/#kwant>`_ itself.  Make sure to
+   put the downloaded files into a directory with no other ``.whl`` files.
 
-7. Now open a command prompt with administrator rights, as described in
-   "How do I run a command with elevated permissions" at the
-   `Microsoft Windows website <http://windows.microsoft.com/en-us/windows/command-prompt-faq>`_.
+7. Open a command prompt with administrator rights, as described in “How do I
+   run a command with elevated permissions” at the `Microsoft Windows website
+   <http://windows.microsoft.com/en-us/windows/command-prompt-faq>`_.
 
-   In this new command prompt window, execute ::
+   Go to the directory with the ``.whl`` files, e.g.::
 
-       pip3 install --no-deps *.whl
+       cd c:\Users\YOUR_USERNAME\Downloads
 
-   (This will install all the wheel-files in the current directory.)
-   Now you are done, you can ``import kwant`` from within Python scripts.
+   To install all the ``.whl``-files in the current directory, execute ::
+
+       python3 -c "import pip, glob; pip.main(['install', '--no-deps'] + glob.glob('*.whl'))"
+
+   The above cryptic command is equivalent to ``pip3 install --no-deps
+   *.whl``, i.e. it installs all the wheel files in the current directory
+   using pip.  Because the Windows command interpreter does not support globs,
+   we have to rely on the globbing as provided by Python itself.
+
+Now you are done, you can ``import kwant`` from within Python scripts.
 
 (Note that many other useful scientific packages are available in Gohlke’s
 repository.  For example, you might want to install `IPython
-- 
GitLab