Skip to content

Commit

Permalink
spack style: fix isort on sl:7
Browse files Browse the repository at this point in the history
fixes spack#41096

Bump the minimum version required for isort. This should fix
an issue reported on Scientific Linux 7, and due to:

PyCQA/isort#1363
  • Loading branch information
alalazo committed Nov 17, 2023
1 parent a3d6714 commit 9349610
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/spack/spack/bootstrap/environment.py
Expand Up @@ -161,7 +161,7 @@ def _write_spack_yaml_file(self) -> None:

def isort_root_spec() -> str:
"""Return the root spec used to bootstrap isort"""
return _root_spec("py-isort@4.3.5:")
return _root_spec("py-isort@5")


def mypy_root_spec() -> str:
Expand Down
16 changes: 13 additions & 3 deletions var/spack/repos/builtin/packages/py-isort/package.py
Expand Up @@ -16,13 +16,23 @@ class PyIsort(PythonPackage):
version("5.10.1", sha256="e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951")
version("5.9.3", sha256="9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899")
version("5.9.1", sha256="83510593e07e433b77bd5bff0f6f607dbafa06d1a89022616f02d8b699cfcd56")
version("4.3.20", sha256="c40744b6bc5162bbb39c1257fe298b7a393861d50978b565f3ccd9cb9de0182a")
version("4.2.15", sha256="79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983")
version(
"4.3.20",
sha256="c40744b6bc5162bbb39c1257fe298b7a393861d50978b565f3ccd9cb9de0182a",
deprecated=True,
)
version(
"4.2.15",
sha256="79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983",
deprecated=True,
)

variant("colors", default=False, description="Install colorama for --color support")

depends_on("python@3.8:", when="@5.12:", type=("build", "run"))
depends_on("python@3.6.1:3", when="@5:5.10", type=("build", "run"))
# This needs to be @3.6 since for bootstrapping the current Spack interpreter is
# identified by major.minor (and the new versioning identifies it as @=3.6)
depends_on("python@3.6", when="@5:5.10", type=("build", "run"))
depends_on("py-setuptools", when="@:4", type=("build", "run"))
depends_on("py-poetry-core@1:", when="@5:", type="build")
depends_on("py-colorama@0.4.3:", when="+colors @5.12:", type=("build", "run"))
Expand Down

0 comments on commit 9349610

Please sign in to comment.