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>
Cc: 73816 <at> debbugs.gnu.org
Subject: bug#73816: python-django's manage.py tries to use a hard-coded python executable
Date: Fri, 13 Dec 2024 12:57:44 +0100
Hi,

On Wed, 11 Dec 2024 at 12:48, Gabriel Wicki <gabriel <at> erlikon.ch> wrote:

> If you have any idea on how to patch that and could point me in that
> direction, I'll gladly send in a patch or two!

It needs to replace the phases something like:

--8<---------------cut here---------------start------------->8---
1 file changed, 16 insertions(+)
gnu/packages/django.scm | 16 ++++++++++++++++

modified   gnu/packages/django.scm
@@ -99,6 +99,22 @@ (define-public python-django-4.2
                    (setenv "PYTHONPATH" "..")
                    (apply invoke "python" "runtests.py" test-flags))
                  (format #t "test suite not run~%"))))
+         (replace 'patch-source-shebangs
+           (lambda _
+             (for-each patch-shebang
+                       (find-files "."
+                                   (lambda (file stat)
+                                     (and (eq? 'regular (stat:type stat))
+                                          (not (string-suffix? "py-tpl" file))))
+                                   #:stat lstat))))
+         (replace 'patch-generated-file-shebangs
+           (lambda _
+             (for-each patch-shebang
+                       (find-files "."
+                                   (lambda (file stat)
+                                     (and (eq? 'regular (stat:type stat))
+                                          (not (string-suffix? "py-tpl" file))))
+                                   #:stat lstat))))
          ;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
          ;; see <https://bugs.gnu.org/25235>.  The django-admin script typically
          ;; runs in an environment that has Django and its dependencies on
--8<---------------cut here---------------end--------------->8---

Feel free to submit a patch. :-)

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.