pythonRelaxDepsHook: make distribution name matching case insensitive
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.
This commit is contained in:
parent
e9d5ba3cfe
commit
48b43e51e5
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user