diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-10-22 13:52:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 13:52:46 +0200 |
commit | d274769761f98611ad6741b6f721eb0687765b6e (patch) | |
tree | 21037d529018930a3930b2790401ae80cbe1cc2d | |
parent | 7cec6476c79834477d1e3246e1e029872acd37f6 (diff) | |
download | spack-d274769761f98611ad6741b6f721eb0687765b6e.tar.gz spack-d274769761f98611ad6741b6f721eb0687765b6e.tar.bz2 spack-d274769761f98611ad6741b6f721eb0687765b6e.tar.xz spack-d274769761f98611ad6741b6f721eb0687765b6e.zip |
Backport #186 from py-py to fix macOS failures (#26653)
Backports the relevant bits of https://github.com/pytest-dev/py/commit/0f77b6e66f79c07dbb657e2b4a7e94263eacc01b
-rw-r--r-- | lib/spack/external/py/_path/local.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/external/py/_path/local.py b/lib/spack/external/py/_path/local.py index 2ffdaddf06..d2f16b993e 100644 --- a/lib/spack/external/py/_path/local.py +++ b/lib/spack/external/py/_path/local.py @@ -10,7 +10,7 @@ from py._path import common from py._path.common import iswin32, fspath from stat import S_ISLNK, S_ISDIR, S_ISREG -from os.path import abspath, normcase, normpath, isabs, exists, isdir, isfile, islink, dirname +from os.path import abspath, normpath, isabs, exists, isdir, isfile, islink, dirname if sys.version_info > (3,0): def map_as_list(func, iter): @@ -801,10 +801,10 @@ class LocalPath(FSBase): if rootdir is None: rootdir = cls.get_temproot() - nprefix = normcase(prefix) + nprefix = prefix.lower() def parse_num(path): """ parse the number out of a path (if it matches the prefix) """ - nbasename = normcase(path.basename) + nbasename = path.basename.lower() if nbasename.startswith(nprefix): try: return int(nbasename[len(nprefix):]) |