Report forwarded
to bug-guix@gnu.org: bug#76211; Package guix.
(Tue, 11 Feb 2025 19:13:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Evgeny Pisemsky <mail@pisemsky.site>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org.
(Tue, 11 Feb 2025 19:13:02 GMT) (full text, mbox, link).
For some reason installed package lacks templates and other media
files listed in the source's MANIFEST.in, which makes it unusable.
Tests can't prove it because they are run in the source directory.
Manual install from source into venv with =pip install .= works as
expected, so this could be a bug in python/pyproject build system.
Severity set to 'important' from 'normal'
Request was from Evgeny Pisemsky <mail@pisemsky.site>
to control@debbugs.gnu.org.
(Fri, 28 Feb 2025 10:34:02 GMT) (full text, mbox, link).
Information forwarded
to bug-guix@gnu.org: bug#76211; Package guix.
(Wed, 26 Mar 2025 02:07:01 GMT) (full text, mbox, link).
Hi,
MANIFEST.in contains a list of files that are not temp files.
It's basically a poor-man's version control staging. When you invoke
"python3 setup.py sdist" (which creates a *source* distribution),
that will include all the files specified in MANIFEST.in .
As for what happens on installation (which is a different thing),
whether something is in MANIFEST.in or not shouldn't really change
anything by default (except when you set include_package_data--and
even then only in some cases).
It's interesting that for pip install, that does install templates.
What setup.py command does that use?
Which directory exactly does it put the templates in?
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?
Depending on the answer to that, setup.py's include_package_data=True
could be useful. See also <https://github.com/pypa/setuptools/issues/3732>.
Alternatively, setup.py's data_files could be set. It would also be a
lot less opaque that way.
See <https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html>,
especially footnote 2 there.
Information forwarded
to bug-guix@gnu.org: bug#76211; Package guix.
(Wed, 02 Apr 2025 22:41:02 GMT) (full text, mbox, link).
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.
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.