From 4b9e90be09d9b33147c9ba916383da2d8cd75611 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 16 Apr 2004 10:43:51 +0000 Subject: [PATCH] check MANIFEST against the files actually unpacked git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2283 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + run_tests.py | 3 +++ setup.py | 21 ++++++++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 377ed7e..262529c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,7 @@ Feature: - added another sample detector "creator_resolution" - added search_checkboxes as an option for the search form - added IMAP support to mail gateway (sf rfe 934000) +- check MANIFEST against the files actually unpacked Fixed: - mysql and postgresql schema mutation now handle added Multilinks diff --git a/run_tests.py b/run_tests.py index 70311a2..2cb85a6 100644 --- a/run_tests.py +++ b/run_tests.py @@ -622,6 +622,9 @@ def main(module_filter, test_filter, libdir): # Hmm... logini = os.path.abspath("log.ini") + from setup import check_manifest + check_manifest() + # Initialize the path and cwd global pathinit pathinit = PathInit(build, build_inplace, libdir) diff --git a/setup.py b/setup.py index aac46c3..f5e654a 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: setup.py,v 1.59 2004-03-24 05:56:06 richard Exp $ +# $Id: setup.py,v 1.60 2004-04-16 10:43:51 richard Exp $ from distutils.core import setup, Extension from distutils.util import get_platform @@ -128,6 +128,25 @@ def scriptname(path): script = script + ".bat" return script +def check_manifest(): + """Check that the files listed in the MANIFEST are present when the + source is unpacked. + """ + try: + f = open('MANIFEST') + except: + print '\n*** SOURCE ERROR: The MANIFEST file is missing!' + sys.exit(1) + try: + manifest = [l.strip() for l in f.readlines()] + finally: + f.close() + err = [line for line in manifest if not os.path.exists(line)] + if err: + n = len(manifest) + print '\n*** SOURCE ERROR: There are files missing (%d/%d found)!'%( + n-len(err), n) + sys.exit(1) ############################################################################# -- 2.30.2