summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/llnl/url.py6
-rw-r--r--lib/spack/spack/test/llnl/url.py9
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/spack/llnl/url.py b/lib/spack/llnl/url.py
index 9812af5eaa..92acfed38d 100644
--- a/lib/spack/llnl/url.py
+++ b/lib/spack/llnl/url.py
@@ -357,10 +357,8 @@ def strip_version_suffixes(path_or_url: str) -> str:
r"i[36]86",
r"ppc64(le)?",
r"armv?(7l|6l|64)?",
- # PyPI
- r"[._-]py[23].*\.whl",
- r"[._-]cp[23].*\.whl",
- r"[._-]win.*\.exe",
+ # PyPI wheels
+ r"-(?:py|cp)[23].*",
]
for regex in suffix_regexes:
diff --git a/lib/spack/spack/test/llnl/url.py b/lib/spack/spack/test/llnl/url.py
index 3e13e6a729..ffe344fee2 100644
--- a/lib/spack/spack/test/llnl/url.py
+++ b/lib/spack/spack/test/llnl/url.py
@@ -84,14 +84,15 @@ def test_get_bad_extension():
("astyle_1.23_macosx", "astyle_1.23"),
("haxe-2.08-osx", "haxe-2.08"),
# PyPI - wheel
- ("entrypoints-0.2.2-py2.py3-none-any.whl", "entrypoints-0.2.2"),
+ ("wheel-1.2.3-py3-none-any", "wheel-1.2.3"),
+ ("wheel-1.2.3-py2.py3-none-any", "wheel-1.2.3"),
+ ("wheel-1.2.3-cp38-abi3-macosx_10_12_x86_64", "wheel-1.2.3"),
+ ("entrypoints-0.2.2-py2.py3-none-any", "entrypoints-0.2.2"),
(
"numpy-1.12.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel."
- "macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl",
+ "macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64",
"numpy-1.12.0",
),
- # PyPI - exe
- ("PyYAML-3.12.win-amd64-py3.5.exe", "PyYAML-3.12"),
# Combinations of multiple patterns - bin, release
("rocketmq-all-4.5.2-bin-release", "rocketmq-all-4.5.2"),
# Combinations of multiple patterns - all