From 4d2ed35552697cc6a41e92395cfdc0edc60a0733 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 2 Aug 2022 21:49:36 -0500 Subject: [PATCH] black: fix bootstrap for Python 3.6 (#31872) * py-platformdirs: sanitize UTF-8 setup.cfg on Python 3.6 * py-platformdirs: black compliance * Minimal fix per @adamjstewart --- .../repos/builtin/packages/py-platformdirs/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-platformdirs/package.py b/var/spack/repos/builtin/packages/py-platformdirs/package.py index c1de5eb2c3..8531128ab7 100644 --- a/var/spack/repos/builtin/packages/py-platformdirs/package.py +++ b/var/spack/repos/builtin/packages/py-platformdirs/package.py @@ -13,8 +13,19 @@ class PyPlatformdirs(PythonPackage): homepage = "https://github.com/platformdirs/platformdirs" pypi = "platformdirs/platformdirs-2.4.0.tar.gz" + version("2.4.1", sha256="440633ddfebcc36264232365d7840a970e75e1018d15b4327d11f91909045fda") version("2.4.0", sha256="367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2") + version("2.3.0", sha256="15b056538719b1c94bdaccb29e5f81879c7f7f0f4a153f46086d155dffcd4f0f") + depends_on("python@3.7:", when="@2.4.1:", type=("build", "run")) depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools@44:", type="build") depends_on("py-setuptools-scm@5:+toml", type="build") + + @when("^python@:3.6") + def setup_build_environment(self, env): + """Python 3.6 needs a little help with setup.cfg re: + + https://github.com/platformdirs/platformdirs/issues/50 + """ + env.set("LC_ALL", "en_US.UTF-8")