From 7b394c4926dcb860a356eeb46b1f1f5d807041f7 Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Wed, 19 Apr 2017 15:06:21 -0300 Subject: check-package: move parts to subdirectory Currently the check-package script uses many files in the same directory. This commit keeps the main script in support/scripts/ and moves the rest into a subdirectory. The modules were previously prefixed to make it easy to identify which script they belong to. This is no longer needed when using a subdirectory, so the prefix is removed. Note: if this commit is checked out and the script is run, and later on a previous version is checked out, the file support/scripts/checkpackagelib/__init__.pyc needs to be manually removed to prevent Python interpreter to look for checkpackagelib package when only the checkpackagelib module is available. Reported-by: Thomas Petazzoni Signed-off-by: Ricardo Martincoski Signed-off-by: Thomas Petazzoni --- support/scripts/check-package | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'support/scripts/check-package') diff --git a/support/scripts/check-package b/support/scripts/check-package index 2add4712cd..74ea46f819 100755 --- a/support/scripts/check-package +++ b/support/scripts/check-package @@ -1,5 +1,5 @@ #!/usr/bin/env python -# See support/scripts/check-package.txt before editing this file. +# See support/scripts/checkpackagelib/readme.txt before editing this file. from __future__ import print_function import argparse @@ -7,10 +7,10 @@ import inspect import re import sys -import checkpackagelib_config -import checkpackagelib_hash -import checkpackagelib_mk -import checkpackagelib_patch +import checkpackagelib.lib_config +import checkpackagelib.lib_hash +import checkpackagelib.lib_mk +import checkpackagelib.lib_patch VERBOSE_LEVEL_TO_SHOW_IGNORED_FILES = 3 flags = None # Command line arguments. @@ -48,13 +48,13 @@ def get_lib_from_filename(fname): if FILE_IS_FROM_A_PACKAGE.search(fname) is None: return None if CONFIG_IN_FILENAME.search(fname): - return checkpackagelib_config + return checkpackagelib.lib_config if fname.endswith(".hash"): - return checkpackagelib_hash + return checkpackagelib.lib_hash if fname.endswith(".mk"): - return checkpackagelib_mk + return checkpackagelib.lib_mk if fname.endswith(".patch"): - return checkpackagelib_patch + return checkpackagelib.lib_patch return None -- cgit v1.2.3