GNU bug report logs - #73816
python-django's manage.py tries to use a hard-coded python executable

Previous Next

Package: guix;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Tue, 15 Oct 2024 09:50:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 73816 <at> 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
Hi,

On Tue, 15 Oct 2024 at 11:48, Gabriel Wicki <gabriel <at> 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




This bug report was last modified 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.