bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#73816: python-django's manage.py tries to use a hard-coded python ex


From: Simon Tournier
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@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]