Freeze Question

David Detlefsen detlefsend at enovatia.com
Thu Aug 7 16:40:06 EDT 2003


On 8/7/03 1:09 PM, "Skip Montanaro" <skip at pobox.com> wrote:

> 
>   Dave> I'm to the point where two modules are not found by freeze:
> 
>   Dave> Warning:  unknown modules remain:  pcre strop
> 
>   Dave> There is no mention of these in my Modules/Setup file.  Any
>   Dave> suggestions.
> 
> I think you can probably omit both, though if freeze is figuring things out
> for you automagically, you may need to tweak Lib/string.py and Lib/re.py to
> dispense with them.  The strop module is an extension module which used to
> be used to speed up the string module.  With string methods it's no longer
> needed.  It's in Modules/stropmodule.c.  Pcre is pretty kaput as well.  That
> was the first incarnation of Perl-compatible regular expressions, since
> replaced by the new sre module.  It's in Modules/pcremodule.c.  I suspect
> Modules/pypcre.c is part of the mix as well.
> 
> Skip

I think I'm all set with Freeze with a static python build.

Just to summarize and close the loop on this, here's what I did:

1.  Modified Modules/Setup uncommenting as many modules I could find that
freeze was complaining about (this took care of all but strop and pcre)

2.  Commented out references to strop in all Lib/*.py it existed in which
included only string.py and stringold.py (python 2.2.1)

3.  Removed (actually renamed) Modules/pre.py...not sure why this was
getting included in my build since re.py had an if/else that should have
caused sre to be imported (and presumably eliminating the dependency on
pcre) instead of pre...not sure if that makes sense.

4.  Did a 'make clean' and a 'make' to a static python

5.  Freeze my python program without any Warning: unknown modules error

Dave










More information about the Python-list mailing list