cx_freeze: How do I add package files into library.zip?
问题 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? 回答1: You could fix this, adding the following method: def include_files(): path_base = "C:\\Python27\\Lib\\site-packages\\pytz\\zoneinfo\\" skip_count = len(path_base) zip_includes = [