python-django executable unable to find 'django' module

  • Open
  • quality assurance status badge
Details
One participant
  • Gabriel Wicki
Owner
unassigned
Submitted by
Gabriel Wicki
Severity
normal
G
G
Gabriel Wicki wrote on 8 Oct 2024 10:45
(address . bug-guix@gnu.org)
cj65yiuwzqkh656gta2krqqith5t7inqvdmmnjtabxk4jbcp37@rzf35zdsowgz
Running

guix shell python-django -- django-admin

throws a "ModuleNotFoundError: No module named 'django'".
G
G
Gabriel Wicki wrote on 8 Oct 2024 12:45
Re: bug#73700: Acknowledgement (python-django executable unable to find 'django' module)
(address . 73700@debbugs.gnu.org)
mbslo2q2453a2u6k4ardgd6cd37nuz33rf5qooakb3cy6au7ci@wnnqbyogg2rq
The following is an obvious, simple fix. I am not sure how others
regard the issue at hand i would summarize as usability vs. disk-space.
IMHO usability - or shipping broken executables - should be prioritized
before saving some hundred megabytes.

From 5601bbf93baf65e1f6902bf678acb9dddb9e98f1 Mon Sep 17 00:00:00 2001
Message-ID: <5601bbf93baf65e1f6902bf678acb9dddb9e98f1.1728384174.git.gabriel@erlikon.ch>
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Tue, 8 Oct 2024 12:41:14 +0200
Subject: [PATCH] gnu: python-django: Fix broken django-admin executable.

* gnu/packages/django.scm (python-django) [phases]: Un-delete 'wrap phase.

Change-Id: If8c3c7f7396e7865a7c0ea662845b228984a4789
---
gnu/packages/django.scm | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 4404c8368d..d0e331e0aa 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -98,13 +98,7 @@ (define-public python-django-4.2
;; Tests expect PYTHONPATH to contain the root directory.
(setenv "PYTHONPATH" "..")
(apply invoke "python" "runtests.py" test-flags))
- (format #t "test suite not run~%"))))
- ;; 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
- ;; PYTHONPATH, so just disable the wrapper to reduce the size from
- ;; ~710 MiB to ~203 MiB.
- (delete 'wrap))))
+ (format #t "test suite not run~%")))))))
;; TODO: Install extras/django_bash_completion.
(native-inputs
(list tzdata-for-tests

base-commit: d44beb9b4ad836781928a0c5667e94c0d6df13f0
--
2.45.2
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73700@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73700
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch