From 48b43e51e5beed7de27ce930d8b2f581c3365670 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 9 Dec 2023 19:34:50 +0100 Subject: [PATCH] pythonRelaxDepsHook: make distribution name matching case insensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Is it PyOpenSSL or pyOpenSSL or pyopenssl? With this change you don't have to care. Write it as pYoPeNSsL for all I care¹. Can we do it like that? Yes, we can. Distribution names should be matched with `re.IGNORECASE` according to the wheel specification². [1] https://packaging.python.org/en/latest/specifications/core-metadata/#name [2] Just kidding, please make it look sane. --- .../interpreters/python/hooks/python-relax-deps-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh index 1ac91fb40e4e..293bd5cebd50 100644 --- a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -52,7 +52,7 @@ _pythonRelaxDeps() { else for dep in $pythonRelaxDeps; do sed -i "$metadata_file" -r \ - -e "s/(Requires-Dist: $dep\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/" + -e "s/(Requires-Dist: $dep\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/i" done fi }