New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34053#issuecomment-968304770 Comment: > My position here is that sage shouldn't be merged into void as long as it's using built-in python. Fair enough, I tend to think the same. Hopefully it will work with python 3.10 by the time they release sagemath-9.5. If it doesn't, though, it may mean another 6 months wait for sagemath-9.6. > Most of the hooks exist for good reason, and I don't think this change has enough value. Doesn't scanning and replacing all python shebangs cause issues in any other situations? In this case we are mostly replacing "#! /usr/bin/env python3" or worse "#! /usr/bin/env sage-python" (which complains about lack of python version and aborts). In particular this is NOT about hardcoding paths to the python interpreter but allowing it to run through env. It might be argued that rewriting "#! /usr/bin/env sage-python" is incorrect. Also: for packages with lots of files (and/or huge text files?) this hook takes its time... AFAICT it's not only checking in /usr/bin or +x files but every single non-binary file is scanned. A similar situation is 11-pkglint-elf-in-usrshare, but for that case we have "ignore_elf_dirs=". Example package pari-galpol contains 14681 files and using `nostrip=true` plus `ignore_elf_dirs=/usr/share/pari` saves ~ 3m in install step. It may not sound much for CI, but when testing changes locally it's a workflow killer. > A variable to skip specific hooks is also fragile: sometimes we need to change the order they run at, and that means changing their name. That's a good point. It could be made different, e.g. `skip_hooks="pre-pkg:rewrite-python-shebang"` where the first part matches a stage exactly and the second part matches partially, so this is robust to change in the numbers. But I understand this gets a bit hairy... Would one of the following be acceptable: a. fix the pattern in 03-rewrite-python-shebang so it doesn't match "#!/usr/bin/env sage-python". b. add an option "ignore_python_shebang_dirs" similar to "ignore_elf_dirs"