diff options
author | Michael Kuhn <michael.kuhn@ovgu.de> | 2023-11-18 14:43:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-18 07:43:35 -0600 |
commit | 223e5b8ca21b98f87444ae3f708963617b9ce4a8 (patch) | |
tree | 33ad8c3e139757364e8ad1a182a555a760da03c5 /var | |
parent | cb764ce41ce6929f7acad2f32c2710011c899588 (diff) | |
download | spack-223e5b8ca21b98f87444ae3f708963617b9ce4a8.tar.gz spack-223e5b8ca21b98f87444ae3f708963617b9ce4a8.tar.bz2 spack-223e5b8ca21b98f87444ae3f708963617b9ce4a8.tar.xz spack-223e5b8ca21b98f87444ae3f708963617b9ce4a8.zip |
Fix invalid escape sequences (#41130)
Using Python 3.12 in a freshly cloned Spack repository results in
warnings such as this:
```
==> Warning: invalid escape sequence '\$'
==> Warning: invalid escape sequence '\('
==> Warning: invalid escape sequence '\.'
==> Warning: invalid escape sequence '\.'
```
These will turn into errors in 3.13, so fix them. All of them actually
do not need to be regexes, so convert them into normal strings.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ecmwf-atlas/package.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ncview/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-imagecodecs/package.py | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py index 00fce1ec78..d764f8e1bd 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -76,8 +76,8 @@ class EcmwfAtlas(CMakePackage): @when("+fismahigh") def patch(self): - filter_file("http://www\.ecmwf\.int", "", "cmake/atlas-import.cmake.in") # noqa: W605 - filter_file("int\.ecmwf", "", "cmake/atlas-import.cmake.in") # noqa: W605 + filter_file("http://www.ecmwf.int", "", "cmake/atlas-import.cmake.in", string=True) + filter_file("int.ecmwf", "", "cmake/atlas-import.cmake.in", string=True) filter_file('http[^"]+', "", "cmake/atlas_export.cmake") patterns = [".travis.yml", "tools/install*.sh", "tools/github-sha.sh"] for pattern in patterns: diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index 8526b78070..c706245e94 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -26,9 +26,10 @@ class Ncview(AutotoolsPackage): patched_file = "configure" with keep_modification_time(patched_file): filter_file( - "if test x\$CC_TEST_SAME != x\$NETCDF_CC_TEST_SAME; then", # noqa: W605 + "if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then", "if false; then", patched_file, + string=True, ) def url_for_version(self, version): diff --git a/var/spack/repos/builtin/packages/py-imagecodecs/package.py b/var/spack/repos/builtin/packages/py-imagecodecs/package.py index 03195578b6..e156b28e77 100644 --- a/var/spack/repos/builtin/packages/py-imagecodecs/package.py +++ b/var/spack/repos/builtin/packages/py-imagecodecs/package.py @@ -66,11 +66,12 @@ class PyImagecodecs(PythonPackage): ) # 239 filter_file( - "append\('/usr/include/jxrlib'\)", # noqa: W605 + "append('/usr/include/jxrlib')", "extend(('{0}/libjxr/image', '{0}/libjxr/common', '{0}/libjxr/glue'))".format( # noqa: E501 spec["jxrlib-debian"].prefix.include ), "setup.py", + string=True, ) # 367 |