sharlatan pushed a commit to branch master
in repository guix.

commit 0879cb6f667a6c1aaa7774e44b8e806314edf621
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Apr 17 23:02:34 2025 +0100

    gnu: python-django-compressor: Fix Python package data.
    
    Reported in #76211: Incomplete python-django-compressor package.
    
    The built package missed "compressor/templates/compressor" directory
    completely, after an investigation of upstream source it was noticed
    that setup.py implemented a custom function searching "package_data"
    files based on "__init__.py" which are not present in
    "compressor/templates" and "compressor/templates/compressor"; this
    change creates them.
    
    * gnu/packages/django.scm (python-django-compressor) [arguments]
    <phases>: Add 'add-missing-init-files.
    
    Reported-by: Evgeny Pisemsky <[email protected]>
    Change-Id: Icf117c00471a40f918ddda4780cc96d7be311970
---
 gnu/packages/django.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 155f318c5c..461affdef9 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1467,6 +1467,13 @@ forms using your favorite CSS framework, without writing 
template code.")
           (lambda _
             (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))))
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?

Reply via email to