GNU bug report logs -
#76211
Incomplete python-django-compressor package
Previous Next
Reported by: Evgeny Pisemsky <mail <at> pisemsky.site>
Date: Tue, 11 Feb 2025 19:13:02 UTC
Severity: normal
Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/django.scm (python-django-compressor): Add missing files.
[arguments] <phases>: Remove 'add-missing-init-files, add 'add-missing-files
to recursively copy all necessary non-python files. In 'check phase change
directory to run tests against installed package.
Change-Id: Iec7139607510ae09972241f459376750b3d7e461
---
gnu/packages/django.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 461affdef9..aedd83a52e 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1468,15 +1468,19 @@ (define-public python-django-compressor
(substitute* "compressor/tests/test_filters.py"
(("test_calmjs_filter") "_test_calmjs_filter"))))
;; TODO: Report upstream.
- (add-after 'unpack 'add-missing-init-files
- (lambda _
- (call-with-output-file "compressor/templates/__init__.py"
- (const #t))
- (call-with-output-file "compressor/templates/compressor/__init__.py"
- (const #t))))
+ (add-after 'install 'add-missing-files
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((sitedir (site-packages inputs outputs)))
+ (for-each (lambda (dir)
+ (copy-recursively dir (string-append sitedir "/" dir)))
+ '("compressor/templates/compressor"
+ "compressor/tests/static"
+ "compressor/tests/test_templates"
+ "compressor/tests/test_templates_jinja2")))))
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
+ (chdir (site-packages inputs outputs))
(setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
(invoke "django-admin" "test"
"--pythonpath=.")))))))
base-commit: b276cf2f9785c71cc37688c3e2b1db38e2c710a1
--
2.49.0
This bug report was last modified 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.