Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [RFC] option to skip 03-rewrite-python-shebang
Date: Mon, 15 Nov 2021 02:45:25 +0100	[thread overview]
Message-ID: <20211115014525.XvFlCrz3Y5bReaC6irDBZGJ193xYUJswfbeknF0ADzQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34053@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34053#issuecomment-968435224

Comment:
@ericonr thanks for your detailed answer. Let me add a few things:
- I misread the code and in fact `#!/usr/bin/env sage-python` is not rewritten. The first grep will match that, but there is a more precise regexp in the loop that will only match python when preceded by space or / and followed by numbers.
- the hook was failing for sagemath because some shebangs refer to `python` without a version. That's not a bug: these are standalone binaries intended to run with whatever python is already installed in the system, regardless of version (sage will force install python3 if only python2 is available; these binaries may run before that).
- adding `python_version=3` fixes that breakage in a proper way.
- allowing xbps-src to rewrite the shebangs doesn't cause terrible breakage (maybe some things are broken, I don't know yet, but if so they are relatively minor). Maybe sage is not relying on shebangs to run python files that must be run on its own venv with its own python.

I think we can close this PR for now and I'll probably drop the commit from the sagemath branch as well.

If / when we discover issues with some of the rewritten shebangs, we can try to find workarounds.

  parent reply	other threads:[~2021-11-15  1:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 11:20 [PR PATCH] " tornaria
2021-11-13 14:03 ` ericonr
2021-11-14 10:18 ` dkwo
2021-11-14 14:27 ` leahneukirchen
2021-11-14 14:48 ` tornaria
2021-11-14 18:31 ` ericonr
2021-11-15  1:45 ` tornaria [this message]
2021-11-15  1:45 ` [PR PATCH] [Closed]: " tornaria

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=20211115014525.XvFlCrz3Y5bReaC6irDBZGJ193xYUJswfbeknF0ADzQ@z \
    --to=tornaria@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).