I've noticed that pytz misses zoneinfo folder when I try to roll a zip for Windows. Right now I have a workaround that I use after python setup.py build
, namely
7z a -xr!*.py* build\exe.win32-2.7\library.zip C:\Python27\Lib\site-packages\pytz
Is there a proper way to achieve that from setup.py
or something?
error: error in setup script: command 'build_exe' has no such option 'zip-includes'
if I try what you suggest. Usually one uses packages option to include code in there, but pytz has just data files and this option fails if I try to add a "package" pytz/zoneinfo.zip_includes
, distutils can be funny about dashes/underscores. I think 'zip-includes' is talking about library.zip - cx_Freeze doesn't automatically zip everything up for distribution, although of course you can do that yourself."zip_includes": [("C:/Python27/Lib/site-packages/pytz/zoneinfo/", "pytz/zoneinfo/")]
. pytz/zoneinfo/ is empty:( Alsopython setup.py bdist
does create ZIP in dist folder.os.listdir()
to build a list of the files you want.