Python 2.6 + Pytz 2009a + Py2exe problem

Jeff Peck jpeck at fedex.com
Wed Mar 18 03:43:09 EDT 2009


I've recently upgraded to python 2.6 and I'm having trouble building an
executable using the new Pytz package. The relevant section of setup.py is
below.  This was working under python 2.5 using an ancient version of pytz
(2006p).

 

setup(

    console = [dict(script = my_script.py')],

    options = dict(

        py2exe = dict(

            packages = ['pytz', 'pyodbc', 'decimal', 'sqlalchemy'],

            typelibs=[('{00020813-0000-0000-C000-000000000046}', 0, 1, 4)],

     )))

 

    

When I try to run the resulting executable, I get:

pytz.UnknownTimeZoneError: 'US/Central'

 

I noticed that the old version of pytz I was using compiled each timezone
into a .pyc, and these would be included in the resulting library.zip for my
programs. When I build against the new pytz, these files are no longer
getting compiled to .pyc. Instead, when I check the pytz directory in
library.zip, I see these files:

__init__.pyc

reference.pyc

tzfile.pyc

tzinfo.pyc

 

It appears that the zoneinfo directory is missing. I have tried pasting this
in manually with no luck. Any ideas?

 

Thanks,

Jeff Peck

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090318/43a5ddd2/attachment.html>


More information about the Python-list mailing list