SPECS: python-django.spec - we don't insert .py files into package...

Michal Chruszcz troll at pld-linux.org
Thu May 18 12:37:36 CEST 2006


It seems like on Thursday 18 May 2006 12:04, Elan Ruusamäe typed:
> On Thursday 18 May 2006 12:47, Michal Chruszcz wrote:
> > It appears there is actually a problem after removing .py files, but of
> > a different matter.
> > django-admin.py when called with startproject argument creates basic
> > directory structure and copies all the required template files
> > adjusting them a bit. However when there is not any .py (only .py{c,o},
> > which are useless at that very moment) files it crashes. In fact it
> > should crash, since these .py files are now a part of a new
> > project/app.
> > Summarizing, we need these files included, because now we are lacking
> > templates, which are a part of django's functionality.
> > The solution I propose is to keep removing all the .py files, but those
> > in /usr/share/python2.4/site-packages/django/conf/project_template,
> > where are stored these templates. Is this correct?
>
> maybe move the templates to /usr/share/django so %py_postclean won't
> treat these as sourcecode.

That sounds sane.

> or add -x option to %py_postclean macro?
>
> or maybe whole conf/ should be moved to /etc to be more FHS friendly.

conf/ is not meant to be edited. It contains settings for included 
extensions like contrib.admin package.

I think the best solution is to move conf/project_template to %{_datadir} 
and adjust django-admin.py.
-- 
Michal Chruszcz -=- Seen at http://1lo.sanok.pl/~troll/gallery/
Meet Jacek: http://photoblog.be/jacek


More information about the pld-devel-en mailing list