mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-11 11:47:02 +02:00
hooks/pre-pkg/03-rewrite-python-shebang.sh: rewrite plain python shebang
Shebangs containing #!python are ignored currently, which causes a problem since newer versions of python3-setuptools generate this, so replace them with the proper shebang when encountered. https://github.com/pypa/setuptools/issues/4863
This commit is contained in:
parent
06f9d87d57
commit
59d2b25087
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ hook() {
|
||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
[ ! -s "$file" ] && continue
|
[ ! -s "$file" ] && continue
|
||||||
|
|
||||||
pyinterp=$(sed -n -E -e 2q -e 's@^#!.*([[:space:]]|/)(python([0-9](\.[0-9]+)?)?)([[:space:]]+.*|$)@\2@p' "$file")
|
pyinterp=$(sed -n -E -e 2q -e 's@^#!(.*([[:space:]]|/))?(python([0-9](\.[0-9]+)?)?)([[:space:]]+.*|$)@\3@p' "$file")
|
||||||
[ -z "$pyinterp" ] && continue
|
[ -z "$pyinterp" ] && continue
|
||||||
|
|
||||||
pyver=${pyinterp#python}
|
pyver=${pyinterp#python}
|
||||||
|
|
Loading…
Add table
Reference in a new issue