Subject: Re: please review mailman package
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 07/26/2002 14:35:36
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> On Thu, Jul 25, 2002 at 06:24:54PM -0400, Jan Schaumann wrote:

> > I believe you can precompile all python files before installing.
> > Whether or not that is a configure-option (or something) or something
> > that we'd need to do between build and install, I don't know.
> 
> In my case a large bunch of them are not done at install time, but not
> all of them. What is the way to precompile a .py file ?
> I could easily add this to the post-install target.

I think it's something like

python -O -c "from compileall import *; \
compile_dir('dir/containing/.py/files')"

(I'm by no means a python expert, I just had to work on a package that
did this, once, so take caution when following my advice.)

-Jan

-- 
Time is an illusion, lunchtime doubly so.