1.1 --- a/imiptools/handlers/scheduling/manifest.py Thu Jan 26 19:21:02 2017 +0100
1.2 +++ b/imiptools/handlers/scheduling/manifest.py Thu Jan 26 19:33:34 2017 +0100
1.3 @@ -4,7 +4,7 @@
1.4 scheduling_functions = {}
1.5 unlocking_functions = {}
1.6
1.7 -from imiptools.handlers.scheduling.quota import (
1.8 +from imiptools.handlers.scheduling.access import (
1.9 confirmation_functions as c,
1.10 locking_functions as l,
1.11 retraction_functions as r,
1.12 @@ -30,7 +30,7 @@
1.13 scheduling_functions.update(s)
1.14 unlocking_functions.update(u)
1.15
1.16 -from imiptools.handlers.scheduling.access import (
1.17 +from imiptools.handlers.scheduling.quota import (
1.18 confirmation_functions as c,
1.19 locking_functions as l,
1.20 retraction_functions as r,
2.1 --- a/tools/update_scheduling_modules.py Thu Jan 26 19:21:02 2017 +0100
2.2 +++ b/tools/update_scheduling_modules.py Thu Jan 26 19:33:34 2017 +0100
2.3 @@ -3,7 +3,7 @@
2.4 """
2.5 Update the scheduling modules import manifest.
2.6
2.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
2.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
2.9
2.10 This program is free software; you can redistribute it and/or modify it under
2.11 the terms of the GNU General Public License as published by the Free Software
2.12 @@ -21,20 +21,24 @@
2.13
2.14 from glob import glob
2.15 from os.path import join, split, splitext
2.16 -import imiptools.handlers
2.17 +import imp
2.18
2.19 reserved = ["__init__.py", "common.py", "manifest.py"]
2.20
2.21 # The main program generating a new version of the manifest module.
2.22
2.23 if __name__ == "__main__":
2.24 - dirname = join(split(imiptools.handlers.__file__)[0], "scheduling")
2.25 + _f, dirname, _d = imp.find_module("imiptools/handlers")
2.26 + dirname = join(dirname, "scheduling")
2.27
2.28 # Get all Python files in the scheduling directory, filtering out the
2.29 # reserved files that do not provide scheduling functions.
2.30
2.31 filenames = []
2.32 - for filename in glob(join(dirname, "*.py")):
2.33 + found = glob(join(dirname, "*.py"))
2.34 + found.sort()
2.35 +
2.36 + for filename in found:
2.37 filename = split(filename)[-1]
2.38 if filename not in reserved:
2.39 filenames.append(filename)
3.1 --- a/tools/update_storage_modules.py Thu Jan 26 19:21:02 2017 +0100
3.2 +++ b/tools/update_storage_modules.py Thu Jan 26 19:33:34 2017 +0100
3.3 @@ -22,22 +22,27 @@
3.4 from glob import glob
3.5 from os import listdir
3.6 from os.path import commonprefix, isdir, join, split, splitext
3.7 -import imiptools.stores
3.8 +import imp
3.9
3.10 reserved = ["__init__.py", "common.py", "manifest.py"]
3.11
3.12 def get_extensions(dirname):
3.13 filenames = []
3.14 - for filename in glob(join(dirname, "*.py")):
3.15 + found = glob(join(dirname, "*.py"))
3.16 + found.sort()
3.17 +
3.18 + for filename in found:
3.19 leafname = split(filename)[-1]
3.20 if leafname not in reserved:
3.21 filenames.append(filename)
3.22 +
3.23 return filenames
3.24
3.25 # The main program generating a new version of the manifest module.
3.26
3.27 if __name__ == "__main__":
3.28 - dirname = join(split(imiptools.stores.__file__)[0], "")
3.29 + _f, dirname, _d = imp.find_module("imiptools/stores")
3.30 + dirname = join(dirname, "")
3.31 manifest = join(dirname, "manifest.py")
3.32
3.33 # Get all Python files in the stores directory, filtering out the
3.34 @@ -47,7 +52,10 @@
3.35
3.36 # Get all extensions from directories in the stores directory.
3.37
3.38 - for filename in listdir(dirname):
3.39 + found = listdir(dirname)
3.40 + found.sort()
3.41 +
3.42 + for filename in found:
3.43 filename = join(dirname, filename)
3.44 if isdir(filename):
3.45 filenames += get_extensions(filename)