[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question on packaging of python applications



Bastian Kleineidam <calvin@cs.uni-sb.de> writes:

> >I recently created a debian file for my project (see http://subterfugue.org),
> >and discovered just now why including .pyc and .pyo files directly doesn't
> >work optimally.
> Where is the problem? Python bytecode should be platform
> independent! So it is safe to include .pyc and .pyo files. There is no
> need to compile them at configure time.
  There is no need to include .pyc and .pyo in packages as python programs
  can work without at first use. Moreover, this makes packages
  bigger.

  That is why most of us prefer to follow Gregor Hoffleit's method
  (see postinst and prerm samples in /usr/share/doc/python-base)
  i.e py are compiled at postinst time and revoed at prerm time.

> 
> >Is there any sort of policy for this?  Or lacking that, is there a particular
> >package I ought to use as a good model?

> I recommend the Distutils (included in Python 2.0 as a module).
  At the moment, there exists a python-distutils package as Debian did not
  provide a version 2.0 yet.

-- 
Jérôme Marant <jerome.marant@free.fr>

http://jerome.marant.free.fr



Reply to: