Repository: spack/spack

Issue:
Installation issue: Unsatisfiable version in py-apache-beam
### Steps to reproduce the issue

```console
$ spack spec -I py-apache-beam%gcc@11.2.0
```

Tagging maintainers: @adamjstewart @pradyunsg 

### Error message

<details><summary>Error message</summary>

<pre>
==> Error: concretization failed for the following reasons:

   1. Cannot satisfy 'py-dill@0.3.1.1:0.3.1'
</pre></details>


### Information on your system

This is on OLCF's test system, Peak:

* **Spack:** 0.20.0.dev0 (9d681008914f33ca6a09c623906caa707b7f597b)
* **Python:** 3.6.8
* **Platform:** linux-rhel8-power9le
* **Concretizer:** clingo

### Additional information

<pre>
compilers:
  - compiler:
      spec: gcc@11.2.0
      operating_system: rhel8
      modules: [gcc/11.2.0]
      paths:
        cc: gcc
        cxx: g++
        f77: gfortran
        fc: gfortran
      extra_rpaths: []
      environment:
        append_path:
          PKG_CONFIG_PATH: /usr/lib64/pkgconfig
      flags: {}
</pre>

### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
Seems to have been changed here:

https://github.com/spack/spack/commit/c2e1a12cdf44edd7f29e465bbdfdc511b97d9669#diff-8baf97f592cc6a2ec17c1b82f6213dfa724cd661c69704448019efc25b8bb14c

from previous dependency on py-dill was:
<pre>
depends_on('py-dill@0.3.1:0.3.2', type=('build', 'run'))
</pre>

is now
<pre>
depends_on('py-dill@0.3.1.1:0.3.1', type=('build', 'run'))
</pre>

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-dill/package.py b/var/spack/repos/builtin/packages/py-dill/package.py
--- a/var/spack/repos/builtin/packages/py-dill/package.py
+++ b/var/spack/repos/builtin/packages/py-dill/package.py
@@ -15,6 +15,7 @@ class PyDill(PythonPackage):
     version("0.3.6", sha256="e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373")
     version("0.3.5.1", sha256="d75e41f3eff1eee599d738e76ba8f4ad98ea229db8b085318aa2b3333a208c86")
     version("0.3.4", sha256="9f9734205146b2b353ab3fec9af0070237b6ddae78452af83d2fca84d739e675")
+    version("0.3.1.1", sha256="42d8ef819367516592a825746a18073ced42ca169ab1f5f4044134703e7a049c")
     version("0.3.1", sha256="d3ddddf2806a7bc9858b20c02dc174396795545e9d62f243b34481fd26eb3e2c")
     version("0.2.9", sha256="f6d6046f9f9195206063dd0415dff185ad593d6ee8b0e67f12597c0f4df4986f")
     version("0.2.7", sha256="ddda0107e68e4eb1772a9f434f62a513c080c7171bd0dd6fb65d992788509812")
@@ -26,6 +27,9 @@ class PyDill(PythonPackage):
     version("0.2.1", sha256="a54401bdfae419cfe1c9e0b48e9b290afccaa413d2319d9bb0fdb85c130a7923")
     version("0.2", sha256="aba8d4c81c4136310e6ce333bd6f4f3ea2d53bd367e2f69c864428f260c0308c")
 
+    depends_on("py-setuptools@42:", when="@0.3.5.1:", type="build")
+    depends_on("py-setuptools@0.6:", type="build")
+
     # This patch addresses [this issue] with Dill and Spack.
     # The issue was introduced at or before 0.3.5 in [this commit] and is still present in 0.3.6.
     # We backport a [fixing PR] until it lands in upstream.
@@ -34,14 +38,6 @@ class PyDill(PythonPackage):
     # [this commit]: https://github.com/uqfoundation/dill/commit/23c47455da62d4cb8582d8f98f1de9fc6e0971ad
     patch("fix-is-builtin-module.patch", when="@0.3.5:")
 
-    depends_on("python@2.5:2.8,3.1:", type=("build", "run"))
-    depends_on("python@2.6:2.8,3.1:", when="@0.3.0:", type=("build", "run"))
-    depends_on("python@2.7:2.8,3.6:", when="@0.3.4:", type=("build", "run"))
-    depends_on("python@2.7:2.8,3.7:", when="@0.3.5.1:", type=("build", "run"))
-
-    depends_on("py-setuptools@0.6:", type="build")
-    depends_on("py-setuptools@42:", when="@0.3.5.1:", type="build")
-
     def url_for_version(self, version):
         url = "https://pypi.io/packages/source/d/dill/"
 


Test patch: