[Python-Dev] Windows installer and .pyc files mtime

Chris McDonough chrism at zope.com
Wed Aug 27 05:40:18 EDT 2003


The newest Zope installs schlep along a whole Python installation
(including win32all), and precompile all the pyc/pyos at the end of the
install process.  This includes all py files shipped as part of the
Python stdlib, the win32all extension py files, and all Zope py files. 
It does take a bit, but it's not intolerable, even on the creaky 500MHz
Celeron on which I build the stuff.

I think this was probably just an overgeneralization carried over from
the install process for RPMs.  Not compiling .py files after
installation on UNIX typically results in needing to recompile them
every time Pytyhon is invoked because the directories they're typically
installed in are generally not normal-user-writable.  This probably
isn't the case for the majority of Windows installs, but we ignore that
fact and do it anyway.

nothing-quite-like-building-python-using-make-bash-and-pascal-ly y'rs,

- C


On Wed, 2003-08-27 at 00:20, Mark Hammond wrote:
> [Guido]
> > I expect this will be more of a problem as typical Windows users and
> > installations (e.g. XP) become more security aware, software is
> 
> I expect you are correct.  My reason was a little more practical - certain
> h2py.py generated scripts would takes *ages* to compile (way back when sub
> GHz machines were the norm!) and this made the first pywin32 program they
> used (often Pythonwin) very very slow to start.  I didn't want to give the
> wrong impression about how slow it really was <wink>.
> 
> > I guess the way to implement it (and I believe Mark Hammond did indeed
> > do this for win32all) is to run Python near the end of the installer
> > with the compileall.py script as an argument.
> 
> Quite frankly, I would find a DOS window executing "compileall" a deadly
> sin - so I got a little carried away and wrote a WISE extension, so that I
> got a cute progress bar during the compilation :)
> 
> However, I haven't advocated or implemented this for the main installer I
> would prefer to see that effort spent moving from WISE to Inno.  The next
> Inno version will include the previously optional "scripting extensions",
> and this should make it practical to use with Python.  Obviously, a WISE
> extension wouldn't be heading in this direction.
> 
> FYI, the new version of inno is at http://www.jrsoftware.org/is4.php, and
> its license (http://www.jrsoftware.org/files/is/license.txt) would seem a
> better fit for Python than WISE.  Could make a cute little PSA sponsored
> project <wink>.  Pity it uses pascal <frown>.
> 
> Mark
> 
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev




More information about the Python-Dev mailing list