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 <mail@pisemsky.site>
Change-Id: Icf117c00471a40f918ddda4780cc96d7be311970
This commit is contained in:
Sharlatan Hellseher 2025-04-17 23:02:34 +01:00
parent 8335f7b441
commit 0879cb6f66
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -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?