Skip to content

Commit 62d0434

Browse files
author
Richard Jones
committed
check MANIFEST against the files actually unpacked
1 parent 0ddda7f commit 62d0434

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Feature:
1212
- added another sample detector "creator_resolution"
1313
- added search_checkboxes as an option for the search form
1414
- added IMAP support to mail gateway (sf rfe 934000)
15+
- check MANIFEST against the files actually unpacked
1516

1617
Fixed:
1718
- mysql and postgresql schema mutation now handle added Multilinks

run_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ def main(module_filter, test_filter, libdir):
622622
# Hmm...
623623
logini = os.path.abspath("log.ini")
624624

625+
from setup import check_manifest
626+
check_manifest()
627+
625628
# Initialize the path and cwd
626629
global pathinit
627630
pathinit = PathInit(build, build_inplace, libdir)

setup.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: setup.py,v 1.59 2004-03-24 05:56:06 richard Exp $
19+
# $Id: setup.py,v 1.60 2004-04-16 10:43:51 richard Exp $
2020

2121
from distutils.core import setup, Extension
2222
from distutils.util import get_platform
@@ -128,6 +128,25 @@ def scriptname(path):
128128
script = script + ".bat"
129129
return script
130130

131+
def check_manifest():
132+
"""Check that the files listed in the MANIFEST are present when the
133+
source is unpacked.
134+
"""
135+
try:
136+
f = open('MANIFEST')
137+
except:
138+
print '\n*** SOURCE ERROR: The MANIFEST file is missing!'
139+
sys.exit(1)
140+
try:
141+
manifest = [l.strip() for l in f.readlines()]
142+
finally:
143+
f.close()
144+
err = [line for line in manifest if not os.path.exists(line)]
145+
if err:
146+
n = len(manifest)
147+
print '\n*** SOURCE ERROR: There are files missing (%d/%d found)!'%(
148+
n-len(err), n)
149+
sys.exit(1)
131150

132151

133152
#############################################################################

0 commit comments

Comments
 (0)