Hi, Those packages/modules are clearly marked as package data (https://github.com/django/django/blob/master/setup.py#L26-L28), so imo it is a bug in Debian packaging (although I do understand that it might not be the easiest to fix…). According to the man-page of pycompile you can exclude certain packages, this is imo the way to go.
Cheers, Florian P.S.: Also you seem to miss the project_template in your PR. On Saturday, November 28, 2015 at 12:26:27 PM UTC+1, lamby wrote: > > Hi, > > I sent this first as a pull request — talk is cheap, code is better, > etc. — but now feel I should I have posted here first. > > The underlying issue is that Debian packages unconditionally > byte-compile .py files under dist-packages upon installation using > `pycompile` and do not silence errors by design. Thus the "invalid" > files that form part of the `startapp` template require tedious special > attention to avoid errors. > > I'm sure this would affect other, non-Debian, packaging systems, as well > as surface weird behaviour elsewhere. Shipping broken .py files > masquerading as valid ones additionally just feels dirty. > > We templated .py files before, but as the '{{ foo }}' bits were inside > strings, docstrings or comments, the pre-rendered templates were > perfectly valid Python. > > Therefore I think need a way of shipping the "invalid" .py files that > form part of the `startapp` template without .py extensions but, of > course, ensuring they end up as .py after rendering. (Or we use some > entirely different mechanism.) > > My current implementation is > <https://github.com/django/django/pull/5735>; see some additional > comments I made there. > > > Regards, > > -- > Chris Lamb > chris-lamb.co.uk / @lolamby > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/43aba911-9cae-47f5-9b1e-317c826c49a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.