16
16
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21
from glob import glob
24
exclude_list = ('dist/', 'build/','.bzr', 'test', 'pyc', 'scripts/', 'tmp/', \
25
'pot', 'HACKING', 'MANIFEST', 'Makefile', 'profile.py', '.swp')
25
exclude_list = ('dist/', 'build/', '.bzr', 'test', 'pyc', 'scripts/', 'tmp/', \
26
'pot', 'HACKING', 'MANIFEST', 'Makefile', 'profile.py', '.swp')
27
28
for t in glob('dist/*.tar.gz'):
28
29
tarball = tarfile.open(t, 'r')
29
30
files = tarball.getnames()
31
32
for f in [f for f in files if not f.endswith('/')]:
32
# Skip the general directory
33
# Skip the general directory
35
36
tarlist.append(f.split('/', 1)[1])
37
38
for root, dirs, files in os.walk('.'):
38
for f in [f for f in files if not f.endswith('/')]:
39
dirlist.append(os.path.join(root, f).split('/', 1)[1])
43
filename = os.path.join(root, f).split('/', 1)[1]
46
for ex in exclude_list:
47
if filename.count(ex):
53
dirlist.append(filename)
55
missing = list(set(dirlist) - set(tarlist))
42
58
print 'Missing files in tarball:'
44
if f and f not in tarlist:
45
for ex in exclude_list:
59
print '\n'.join("\t%s" % f for f in missing)