Repository: spack/spack

Issue:
Installation issue: py-pylint python depends range
### Steps to reproduce the issue

```console
$ spack install py-pylint@2.3 ^python@3.8
```


### Error message
```
==> Installing py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5
==> No binary for py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5 found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/72/723e3db49555abaf9bf79dc474c6b9e2935ad82230b10c1138a71ea41ac0fff1.tar.gz
==> No patches needed for py-pylint
==> py-pylint: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 1:
    '/tools/spack/opt/linux-rocky8-x86_64/gcc-12.3.0/python/3.8.7-6ygsco57zm4pcbpzguhmvqtsohe7rfok/bin/python3.8' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/tools/spack/opt/linux-rocky8-x86_64/gcc-12.3.0/py-pylint/2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5' '.'

2 errors found in build log:
     12    Processing /build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src
     13      Added file:///build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src to build tracker '/tmp/pip-build-tracker-iy1xb6vg'
     14      Running setup.py (path:/build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src/setup.py) egg_info for package from file:///build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src
     15      Created temporary directory: /tmp/pip-pip-egg-info-fyvkdabk
     16      Preparing metadata (setup.py): started
     17      Running command python setup.py egg_info
  >> 18    /tools/spack/opt/linux-rocky8-x86_64/gcc-12.3.0/py-setuptools/68.0.0-rob25juoqgo4jb44gjm25jouur7jx2w4/lib/python3.8/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
     19      !!
     20    
     21              ********************************************************************************
     22              Requirements should be satisfied by a PEP 517 installer.
     23              If you are using pip, you can try `pip install --use-pep517`.
     24              ********************************************************************************

     ...

     68          setup_py_code = "from setuptools import setup; setup()"
     69    
     70      exec(compile(setup_py_code, filename, "exec"))
     71      '"'"''"'"''"'"' % ('"'"'/build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-fyvkdabk
     72      cwd: /build/apps/spack-stage/spack-stage-py-pylint-2.3.1-hrahhrmwfx444ehohq6swkoxvi4etmk5/spack-src/
     73      Preparing metadata (setup.py): finished with status 'error'
  >> 74    error: metadata-generation-failed
     75    
     76    × Encountered error while generating package metadata.
     77    ╰─> See above for output.
     78    
     79    note: This is an issue with the package mentioned above, not pip.
     80    hint: See above for details.
```


### Information on your system

* **Spack:** 0.21.1 (e30fedab102f9281a220fb4fae82e3f8c43a82ac)
* **Python:** 3.6.8
* **Platform:** linux-rocky8-x86_64
* **Concretizer:** clingo


### Additional information

@adamjstewart
py-pylint@2.3 fails to build with "modern" python versions. 
```python
depends_on("python@3.4:", when="@2:2.7", type=("build", "run"))
```
needs an upper limit on pthyon version or just deprecate 2.3.0 and 2.3.1 since i've tried to build it also with python@3.7 (which is deprecated itself) and it doesn't work either

Just to be clear, i do not ask for py-pylint@2.3 specifically but i had an environment failing to build because it concretized with py-pylint@2.3

### 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:
Good catch! I'm no longer maintaining all Python packages, but in this case I think we should just delete any versions that can't be built with Python 3.8+. Want to submit a PR?
@adamjstewart sure, will do.
Shall I delete completely or mark as deprecated? What's the policy?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py
--- a/var/spack/repos/builtin/packages/py-pylint/package.py
+++ b/var/spack/repos/builtin/packages/py-pylint/package.py
@@ -33,10 +33,7 @@ class PyPylint(PythonPackage):
     version("2.13.5", sha256="dab221658368c7a05242e673c275c488670144123f4bd262b2777249c1c0de9b")
     version("2.11.1", sha256="2c9843fff1a88ca0ad98a256806c82c5a8f86086e7ccbdb93297d86c3f90c436")
     version("2.8.2", sha256="586d8fa9b1891f4b725f587ef267abe2a1bad89d6b184520c7f07a253dd6e217")
-    version("2.3.1", sha256="723e3db49555abaf9bf79dc474c6b9e2935ad82230b10c1138a71ea41ac0fff1")
-    version("2.3.0", sha256="ee80c7af4f127b2a480d83010c9f0e97beb8eaa652b78c2837d3ed30b12e1182")
 
-    depends_on("python@3.4:", when="@2:2.7", type=("build", "run"))
     depends_on("python@3.6:", when="@2.8.2:", type=("build", "run"))
     depends_on("python@3.6.2:", when="@2.13.5:", type=("build", "run"))
     depends_on("python@3.7.2:", when="@2.14.0:", type=("build", "run"))


Test patch: