unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Gabriel Wicki <gabriel@erlikon.ch>, 73816@debbugs.gnu.org
Subject: bug#73816: python-django's manage.py tries to use a hard-coded python executable
Date: Tue, 10 Dec 2024 16:59:27 +0100	[thread overview]
Message-ID: <877c87zfz4.fsf@gmail.com> (raw)
In-Reply-To: <mjgot2cwzzfhicsyobhubmc3dsbviysha56nqt4c3epp3emdrc@4ovou422lxuv>

Hi,

On Tue, 15 Oct 2024 at 11:48, Gabriel Wicki <gabriel@erlikon.ch> wrote:

> The python-django package makes the admin utility create a manage.py
> file with a hard-coded python interpreter.
>
>   $ guix shell python python-django -- django-admin startproject foobar
>   $ head -n 1 foobar/manage.py
>   #!/gnu/store/my2j5bzapayk59971z2ryzlajdz569f9-python-toolchain-3.10.7/bin/python
>
> I think this is wrong.  The interpreter line should be
>
>   #!/usr/bin/env python3

Well, I don’t know if there is a rationale for this choice.  Somehow, my
understanding is: 1. python-django is byte-compiled using one specific
Python interpreter and 2. what is the guarantee that the whole code
byte-compiled with different Python interpreter will run?

Hence, that version of the specific Python interpreter is encoded.

Now, if the purpose of ’django-admin startproject foobar’ is to only
create generic configuration that does not depends on any Django or
Python version, then maybe it could be considered as wrong. :-)

Else I don’t know.  I remember having a similar discussion about a
similar Python tool but I am not able to find it back.

Cheers,
simon




  reply	other threads:[~2024-12-10 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15  9:48 bug#73816: python-django's manage.py tries to use a hard-coded python executable Gabriel Wicki
2024-12-10 15:59 ` Simon Tournier [this message]
2024-12-11 11:48   ` Gabriel Wicki
2024-12-13 11:57     ` Simon Tournier

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877c87zfz4.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=73816@debbugs.gnu.org \
    --cc=gabriel@erlikon.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).