From 06dcf72f142cf2637a3044aae7c5bff429a9e7b4 Mon Sep 17 00:00:00 2001
From: "Adam J. Stewart" <ajstewart426@gmail.com>
Date: Mon, 26 Nov 2018 02:11:16 -0600
Subject: [PATCH] Uncomment dependencies previously disallowed by concretizer
 (#9942)

---
 .../repos/builtin/packages/cantera/package.py      |  5 ++---
 .../builtin/packages/py-configparser/package.py    |  5 +----
 .../repos/builtin/packages/py-enum34/package.py    |  5 +----
 .../repos/builtin/packages/py-flake8/package.py    |  7 ++-----
 .../repos/builtin/packages/py-future/package.py    |  4 ++--
 .../repos/builtin/packages/py-ipython/package.py   |  9 ++-------
 .../builtin/packages/py-jsonschema/package.py      |  6 +-----
 .../repos/builtin/packages/py-pybtex/package.py    |  4 +---
 .../repos/builtin/packages/py-rasterio/package.py  |  5 +----
 .../builtin/packages/py-singledispatch/package.py  |  5 +----
 .../builtin/packages/py-slurm-pipeline/package.py  |  4 +---
 .../repos/builtin/packages/py-sphinx/package.py    |  7 ++-----
 .../repos/builtin/packages/py-tornado/package.py   | 14 ++++----------
 .../repos/builtin/packages/py-traitlets/package.py |  5 +----
 14 files changed, 22 insertions(+), 63 deletions(-)

diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
index b710163870..55e9dae69e 100644
--- a/var/spack/repos/builtin/packages/cantera/package.py
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -37,9 +37,8 @@ class Cantera(SConsPackage):
     depends_on('py-numpy',  when='+python', type=('build', 'run'))
     depends_on('py-scipy',  when='+python', type=('build', 'run'))
     depends_on('py-3to2',   when='+python', type=('build', 'run'))
-    # TODO: these "when" specs don't actually work
-    # depends_on('py-unittest2',     when='+python^python@2.6', type=('build', 'run'))  # noqa
-    # depends_on('py-unittest2py3k', when='+python^python@3.1', type=('build', 'run'))  # noqa
+    depends_on('py-unittest2',     when='+python^python@2.6.0:2.6.999', type=('build', 'run'))
+    depends_on('py-unittest2py3k', when='+python^python@3.1.0:3.1.999', type=('build', 'run'))
 
     # Matlab toolbox dependencies
     extends('matlab', when='+matlab')
diff --git a/var/spack/repos/builtin/packages/py-configparser/package.py b/var/spack/repos/builtin/packages/py-configparser/package.py
index 6652dc449e..59959763aa 100644
--- a/var/spack/repos/builtin/packages/py-configparser/package.py
+++ b/var/spack/repos/builtin/packages/py-configparser/package.py
@@ -16,7 +16,4 @@ class PyConfigparser(PythonPackage):
     version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538')
 
     depends_on('py-setuptools', type='build')
-
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
+    depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-enum34/package.py b/var/spack/repos/builtin/packages/py-enum34/package.py
index eb28715f24..b3b1c9cc11 100644
--- a/var/spack/repos/builtin/packages/py-enum34/package.py
+++ b/var/spack/repos/builtin/packages/py-enum34/package.py
@@ -16,8 +16,5 @@ class PyEnum34(PythonPackage):
 
     depends_on('python')
     conflicts('python@3.4:')
-
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
+    depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))
     depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py
index 75a8e999f4..b8f4bcb11e 100644
--- a/var/spack/repos/builtin/packages/py-flake8/package.py
+++ b/var/spack/repos/builtin/packages/py-flake8/package.py
@@ -45,11 +45,8 @@ class PyFlake8(PythonPackage):
     # mccabe >= 0.2.1, < 0.5
     depends_on('py-mccabe@0.2.1:0.4.0', when='@2.5.4', type=('build', 'run'))
 
-    # These dependencies breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-configparser', when='^python@:3.3', type=('build', 'run'))
-    # depends_on('py-enum34', when='^python@:3.1', type=('build', 'run'))
-    depends_on('py-configparser', type=('build', 'run'))
+    depends_on('py-configparser', when='^python@:3.3', type=('build', 'run'))
+    depends_on('py-enum34', when='^python@:3.1', type=('build', 'run'))
 
     # py-enum34 provides enum module from Python 3.4 for Python
     # versions 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, and 3.3; use built-in enum
diff --git a/var/spack/repos/builtin/packages/py-future/package.py b/var/spack/repos/builtin/packages/py-future/package.py
index 862abd8e64..afd1c7bf3b 100644
--- a/var/spack/repos/builtin/packages/py-future/package.py
+++ b/var/spack/repos/builtin/packages/py-future/package.py
@@ -16,5 +16,5 @@ class PyFuture(PythonPackage):
     version('0.15.2', 'a68eb3c90b3b76714c5ceb8c09ea3a06')
 
     depends_on('py-setuptools', type='build')
-    # depends_on('py-importlib', type=('build', 'run'), when='^python@2.6')
-    # depends_on('py-argparse', type=('build', 'run'), when='^python@2.6')
+    depends_on('py-importlib', type=('build', 'run'), when='^python@:2.6')
+    depends_on('py-argparse', type=('build', 'run'), when='^python@:2.6')
diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py
index d6373ab393..ee80c3d97e 100644
--- a/var/spack/repos/builtin/packages/py-ipython/package.py
+++ b/var/spack/repos/builtin/packages/py-ipython/package.py
@@ -20,13 +20,8 @@ class PyIpython(PythonPackage):
 
     depends_on('python@2.7:2.8,3.3:')
 
-    # These dependencies breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-backports-shutil-get-terminal-size', type=('build', 'run'), when="^python@:3.2")  # noqa
-    # depends_on('py-pathlib2', type=('build', 'run'), when="^python@:3.3")
-    depends_on('py-backports-shutil-get-terminal-size', type=('build', 'run'))
-    depends_on('py-pathlib2',                   type=('build', 'run'))
-
+    depends_on('py-backports-shutil-get-terminal-size', type=('build', 'run'), when="^python@:3.2")
+    depends_on('py-pathlib2', type=('build', 'run'), when="^python@:3.3")
     depends_on('py-pygments',                   type=('build', 'run'))
     depends_on('py-pickleshare',                type=('build', 'run'))
     depends_on('py-simplegeneric@0.8:',         type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-jsonschema/package.py b/var/spack/repos/builtin/packages/py-jsonschema/package.py
index dacd9cad01..86392c880c 100644
--- a/var/spack/repos/builtin/packages/py-jsonschema/package.py
+++ b/var/spack/repos/builtin/packages/py-jsonschema/package.py
@@ -16,8 +16,4 @@ class PyJsonschema(PythonPackage):
 
     depends_on('py-setuptools', type='build')
     depends_on('py-vcversioner', type=('build', 'run'))
-
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-functools32', when="^python@2.7", type=('build', 'run'))
-    depends_on('py-functools32', type=('build', 'run'))
+    depends_on('py-functools32', when="^python@2.7.0:2.7.999", type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-pybtex/package.py b/var/spack/repos/builtin/packages/py-pybtex/package.py
index fd0bac735a..1957108e98 100644
--- a/var/spack/repos/builtin/packages/py-pybtex/package.py
+++ b/var/spack/repos/builtin/packages/py-pybtex/package.py
@@ -31,6 +31,4 @@ class PyPybtex(PythonPackage):
     depends_on('py-setuptools', type='build')
     depends_on('py-latexcodec@1.0.4:', type=('build', 'run'))
     depends_on('py-pyyaml@3.01:', type=('build', 'run'))
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-counter@1:', when='^python@:2.6', type=('build', 'run'))
+    depends_on('py-counter@1:', when='^python@:2.6', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-rasterio/package.py b/var/spack/repos/builtin/packages/py-rasterio/package.py
index 567befd2a0..8fe53a803d 100644
--- a/var/spack/repos/builtin/packages/py-rasterio/package.py
+++ b/var/spack/repos/builtin/packages/py-rasterio/package.py
@@ -23,10 +23,7 @@ class PyRasterio(PythonPackage):
 
     depends_on('py-setuptools', type='build')
     depends_on('py-cython', type='build')
-
-    # Only use py-enum34 with Python2
-    # depends_on('py-enum34', type='run', when='^python@:2.7')
-
+    depends_on('py-enum34', type='run', when='^python@:2.7')
     depends_on('py-attrs', type=('build', 'run'))
     depends_on('py-numpy', type=('build', 'run'))
     depends_on('py-cligj', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-singledispatch/package.py b/var/spack/repos/builtin/packages/py-singledispatch/package.py
index ca9ed4513c..caca920fd5 100644
--- a/var/spack/repos/builtin/packages/py-singledispatch/package.py
+++ b/var/spack/repos/builtin/packages/py-singledispatch/package.py
@@ -16,7 +16,4 @@ class PySingledispatch(PythonPackage):
 
     depends_on('py-setuptools', type='build')
     depends_on('py-six', type=('build', 'run'))
-
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-ordereddict', when="^python@:2.6", type=('build', 'run'))
+    depends_on('py-ordereddict', when="^python@:2.6", type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-slurm-pipeline/package.py b/var/spack/repos/builtin/packages/py-slurm-pipeline/package.py
index ffece8a2ac..5f8554d466 100644
--- a/var/spack/repos/builtin/packages/py-slurm-pipeline/package.py
+++ b/var/spack/repos/builtin/packages/py-slurm-pipeline/package.py
@@ -18,6 +18,4 @@ class PySlurmPipeline(PythonPackage):
     depends_on('py-setuptools', type='build')
     # using open range although requirements*.txt give explicit versions
     # test dependencies are omitted, see #7681
-    depends_on('py-six@1.10.0:', type=('build', 'run'))
-    # six only required for python 2, change when ^-dependencies work, cf #2793
-    # depends_on('py-six@1.10.0:', type=('build', 'run'), when='^python@:2.8')
+    depends_on('py-six@1.10.0:', type=('build', 'run'), when='^python@:2.8')
diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py
index 3f0268732f..71872bcbac 100644
--- a/var/spack/repos/builtin/packages/py-sphinx/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx/package.py
@@ -57,13 +57,10 @@ class PySphinx(PythonPackage):
     # http://www.sphinx-doc.org/en/stable/changes.html
     depends_on('py-sphinxcontrib-websupport', when='@1.6:',
                type=('build', 'run'))
-    # TODO: incorporate the proper dependencies when concretizer is capable
     # Build dep for 1.6.1 all python (bug), see:
     # https://github.com/sphinx-doc/sphinx/pull/3789
-    # depends_on('py-typing', when='@1.6.1', type=('build', 'run'))
-    # depends_on('py-typing', when='@1.6.2:^python@2.7:3.4',
-    #            type=('build', 'run'))
-    depends_on('py-typing', when='@1.6:', type=('build', 'run'))
+    depends_on('py-typing', when='@1.6.1', type=('build', 'run'))
+    depends_on('py-typing', when='@1.6.2:^python@2.7:3.4', type=('build', 'run'))
 
     depends_on('py-pytest',     type='test')
     depends_on('py-mock',       type='test')
diff --git a/var/spack/repos/builtin/packages/py-tornado/package.py b/var/spack/repos/builtin/packages/py-tornado/package.py
index c480b27470..946d08a930 100644
--- a/var/spack/repos/builtin/packages/py-tornado/package.py
+++ b/var/spack/repos/builtin/packages/py-tornado/package.py
@@ -17,13 +17,7 @@ class PyTornado(PythonPackage):
     depends_on('py-setuptools', type='build')
 
     # requirements from setup.py
-    # These dependencies breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-backports-ssl-match-hostname', when='^python@:2.7.8', type=('build', 'run'))  # noqa
-    # depends_on('py-singledispatch', when='^python@:3.3', type=('build', 'run'))  # noqa
-    # depends_on('py-certifi', when='^python@:3.3', type=('build', 'run'))
-    # depends_on('py-backports-abc@0.4:', when='^python@:3.4', type=('build', 'run'))  # noqa
-    depends_on('py-backports-ssl-match-hostname', type=('build', 'run'))
-    depends_on('py-singledispatch', type=('build', 'run'))
-    depends_on('py-certifi', type=('build', 'run'))
-    depends_on('py-backports-abc@0.4:', type=('build', 'run'))
+    depends_on('py-backports-ssl-match-hostname', when='^python@:2.7.8', type=('build', 'run'))
+    depends_on('py-singledispatch', when='^python@:3.3', type=('build', 'run'))
+    depends_on('py-certifi', when='^python@:3.3', type=('build', 'run'))
+    depends_on('py-backports-abc@0.4:', when='^python@:3.4', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-traitlets/package.py b/var/spack/repos/builtin/packages/py-traitlets/package.py
index b8d7b418e1..a6c502a573 100644
--- a/var/spack/repos/builtin/packages/py-traitlets/package.py
+++ b/var/spack/repos/builtin/packages/py-traitlets/package.py
@@ -24,7 +24,4 @@ class PyTraitlets(PythonPackage):
     depends_on('py-decorator', type=('build', 'run'))
     depends_on('py-ipython-genutils', type=('build', 'run'))
 
-    # This dependency breaks concretization
-    # See https://github.com/spack/spack/issues/2793
-    # depends_on('py-enum34', when='^python@:3.3', type=('build', 'run'))
-    depends_on('py-enum34', type=('build', 'run'))
+    depends_on('py-enum34', when='^python@:3.3', type=('build', 'run'))
-- 
GitLab