Files
James Gross 80de840881 Even More Syntax Cleanup (#293)
A lot of cleanup things in prep for a python 3 transition. Getting rid of the old exception syntax, converting prints over to logging, cutting random scraps of code to be proper unit tests,  cut away some older bits of code, etc.

This still works in python2. It's just a lot of tidying up. There are no major functionality changes.
2020-09-08 13:00:06 -04:00

28 lines
614 B
Python

import os
import zipfile
pkgnames = ('Elf', 'PE', 'cobra', 'envi', 'vdb', 'visgraph', 'vqt', 'vstruct', 'vtrace')
def addPythonSources( zfile, dirname, filenames ):
if dirname.find('.svn') != -1:
return
for fname in filenames:
if not fname.endswith('.py'):
continue
filepath = os.path.join(dirname, fname)
zfile.write(filepath, filepath)
def getSourceZip(fname='vdb.pyz'):
z = zipfile.ZipFile(fname, 'w')
for pypkg in pkgnames:
os.path.walk(pypkg, addPythonSources, z)
z.write('vdbbin', '__main__.py')
z.close()
return fname