Subject: bug#76211: Incomplete python-django-compressor package

From: Evgeny Pisemsky <[email-masked]>
Date: Thu, 03 Apr 2025 01:40:28 +0300

Hi!

> It's interesting that for pip install, that does install templates.
> What setup.py command does that use?

This is what pip3 in virtualenv says:

#+begin_example
Using legacy 'setup.py install' for django-compressor, since package 'wheel' is not installed.
Installing collected packages: rjsmin, rcssmin, typing-extensions, sqlparse, asgiref, Django, django-appconf, django-compressor
  Running setup.py install for django-compressor ... done
#+end_example

Everything with pure python, i.e. =guix shell python --pure=.

> Which directory exactly does it put the templates in?

After =pip3 install .= from local source in virtualenv:

#+begin_example
env/lib/python3.10/site-packages/compressor/templates/
env/lib/python3.10/site-packages/compressor/templates/compressor
env/lib/python3.10/site-packages/compressor/templates/compressor/css_file.html
env/lib/python3.10/site-packages/compressor/templates/compressor/js_preload.html
env/lib/python3.10/site-packages/compressor/templates/compressor/css_preload.html
env/lib/python3.10/site-packages/compressor/templates/compressor/js_inline.html
env/lib/python3.10/site-packages/compressor/templates/compressor/js_file.html
env/lib/python3.10/site-packages/compressor/templates/compressor/css_inline.html
#+end_example

> Are the templates and other media required for using the package as part
> of a program as an end user--or only if you want to *develop* a new
> package that is using python-django-compressor?

Templates are definitely required in runtime. I have a guixified
django project that started throwing error after upgrade - that's how
I spotted this problem. I fixed it with copy-recursively in phases.

As for suggested solutions, the main problem here is that everything
works fine in "normal" python ecosystem, but not in guix build systems.