import os
import zipfile
os.chdir('pychess-0.10.1/lib')
zf = zipfile.PyZipFile('../../pychess.zip', mode='w')
try:
    zf.writepy('pychess')
finally:
    zf.close()
for name in zf.namelist():
    pass
Zipimport with packages