From a8bcc23fe7138a35c902e41f983408de6dbc874d Mon Sep 17 00:00:00 2001
From: Todd Gamblin <tgamblin@llnl.gov>
Date: Tue, 7 Mar 2017 09:31:15 -0800
Subject: [PATCH] Spack works with Python 3

- Update version guard in spack script to allow python 3
- Update min required version in the docs
---
 README.md                             | 3 ++-
 bin/spack                             | 4 ++--
 lib/spack/docs/contribution_guide.rst | 2 +-
 lib/spack/docs/getting_started.rst    | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 375aad4dd7..68c2939ec6 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,8 @@ See the
 [Feature Overview](http://spack.readthedocs.io/en/latest/features.html)
 for examples and highlights.
 
-To install spack and install your first package:
+To install spack and install your first package, make sure you have
+Python (2 or 3).  Then:
 
     $ git clone https://github.com/llnl/spack.git
     $ cd spack/bin
diff --git a/bin/spack b/bin/spack
index f33d219b8b..c737a0f178 100755
--- a/bin/spack
+++ b/bin/spack
@@ -27,9 +27,9 @@
 from __future__ import print_function
 
 import sys
-if (sys.version_info[0] > 2) or (sys.version_info[:2] < (2, 6)):
+if sys.version_info[:2] < (2, 6):
     v_info = sys.version_info[:3]
-    sys.exit("Spack requires Python 2.6 or 2.7. "
+    sys.exit("Spack requires Python 2.6 or higher."
              "This is Python %d.%d.%d." % v_info)
 
 import os
diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst
index e9cfe1fa54..a3b3197181 100644
--- a/lib/spack/docs/contribution_guide.rst
+++ b/lib/spack/docs/contribution_guide.rst
@@ -40,7 +40,7 @@ for the results of these tests after submitting a PR, we recommend that you run
 locally to speed up the review process.
 
 If you take a look in ``$SPACK_ROOT/.travis.yml``, you'll notice that we test
-against Python 2.6 and 2.7. We currently perform 3 types of tests:
+against Python 2.6, 2.7, and 3.3-3.6. We currently perform 3 types of tests:
 
 ^^^^^^^^^^
 Unit Tests
diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst
index 3c2610beb0..2460f7e54d 100644
--- a/lib/spack/docs/getting_started.rst
+++ b/lib/spack/docs/getting_started.rst
@@ -11,7 +11,7 @@ Prerequisites
 Spack has the following minimum requirements, which must be installed
 before Spack is run:
 
-1. Python 2.6 or 2.7
+1. Python 2 (2.6 or 2.7) or 3 (3.3 - 3.6)
 2. A C/C++ compiler
 3. The ``git`` and ``curl`` commands.
 
-- 
GitLab