From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Make python3 default in 03-rewrite-pyton-shebang.sh hook
Date: Sat, 18 Apr 2020 21:49:00 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21132@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
There is a new pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages hooks
https://github.com/void-linux/void-packages/pull/21132
Make python3 default in 03-rewrite-pyton-shebang.sh hook
The `03-rewrite-python-shebang.sh` hook assumes `python2` by default, overriding only if `python_version` or `pycompile_version` are set, or the package installs some modules in `/usr/lib/python*`.
Not all packages that install Python scripts set these variables or install modules, so the shebang is forced to `python2` by default. Because `python2` is EOL, I think it is sensible to assume these packages are doing the right thing and targeting `python3` instead.
A patch file from https://github.com/void-linux/void-packages/pull/21132.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hooks-21132.patch --]
[-- Type: text/x-diff, Size: 846 bytes --]
From b7809a4ec08d2b8377bb52fdf6a38ffcffed84c9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Sat, 18 Apr 2020 15:42:46 -0400
Subject: [PATCH] Make python3 default in 03-rewrite-python-shebang.sh hook
---
common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
index 4de75da2a76..7114143b73d 100644
--- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
+++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh
@@ -4,7 +4,7 @@
hook() {
local pyver= shebang= off=
- : ${pyver:=2}
+ : ${pyver:=3}
if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then
pyver="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
next reply other threads:[~2020-04-18 19:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 19:49 ahesford [this message]
2020-04-18 19:49 ` xtraeme
2020-04-18 20:34 ` Chocimier
2020-04-20 1:25 ` [PR PATCH] [Updated] " ahesford
2020-04-20 1:27 ` ahesford
2020-04-20 1:32 ` Make python3 default in XBPS environment and hooks q66
2020-04-20 2:03 ` ahesford
2020-04-20 2:21 ` q66
2020-04-20 18:11 ` Chocimier
2020-04-20 20:12 ` ahesford
2020-04-20 20:12 ` [PR PATCH] [Closed]: " ahesford
2020-04-20 20:13 ` ahesford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21132@inbox.vuxu.org \
--to=ahesford@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).