John Levon wrote: > On Mon, Mar 31, 2008 at 08:01:06PM -0700, Ethan Quach wrote: > >>> 53-54: Seems like we could add a suffix rule for .py to Makefile.master >>> as a cleaner and more general answer; that should allow for using the >>> standard PROG and its derived definitions rather than the >> I think ideally we should compile the .py file as well (and perhaps >> deliver the .pyc with our package? I don't know that much about python >> so I'm not really sure if we should or not.) > > It's important that you do this. Otherwise, Python will generate .pyc > files in the same directory and uninstalling the packages (or upgrade or > whatever) will not behave cleanly. > > We tried this both ways and delivering .pyc is the only sane way. > However you do have to be careful as to how you generate the packages - > Python is sensitive to mtime of the .pyc files. If you run stuff as root > and see .pyc files created or modified after the package is installed, > then it's not quite right. >
Yeah, right; there are a bunch of .pyc's that don't verify after installation (mostly in IPS) so there's some work that needs to be done yet. > I think you could look at Mercurial in the SFW gate as a good example of > how to do .pyc > Thanks for the pointer, we'll take a look at it. Dave