Packaging .py files

Mariusz Mazur mmazur at kernel.pl
Thu Jul 17 16:50:24 CEST 2008


Dnia czwartek, 17 lipca 2008, Bartosz Taudul napisał:
> The number of sane developers without inferiority complex is very low
> and I don't like to talk with idiots if I don't have to.

That's why I prefer not to have too many pld specific changes, since it's 
easier to merge something upstream when you can point at a major distro and 
say that the current way also breaks on e.g. Fedora.

> > Doing it 'our way' is simply pointless
>
> Our way? https://wiki.ubuntu.com/DashAsBinSh

Ok, that's enough for me if there are other mainstream distros that don't use 
bash.


Regarding original thread, I'm still in favor of packaging *.py files in base 
packages.

One other option to consider. According to this document:
http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html

Debian does the following:

"If a package provides any binary-independent modules (foo.py files), the 
corresponding bytecompiled modules (foo.pyc files) and optimized modules 
(foo.pyo files) must not ship in the package. Instead, they should be 
generated in the package's postinst, and removed in the package's prerm. The 
package's prerm has to make sure that both foo.pyc and foo.pyo are removed."

This obviously makes installation a bit slower, but has the advantage of being 
python-version independent, meaning when you upgrade python, you don't have 
to rebuild all python-dependant packages and reinstall them -- postinst 
scripts just rebuild *.py{c,o} files on your system and you're done.

Major problem -- it's slower.

-- 
Judge others by their intentions and yourself by your results.
                                                                 Guy Kawasaki
Education is an admirable thing, but it is well to remember from
time to time that nothing that is worth knowing can be taught.
                                                                  Oscar Wilde


More information about the pld-devel-en mailing list