From 1fb38c9e042f9fb349718616e9522a8d99f80128 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 16 Jan 2018 07:00:39 +0100 Subject: Vendor ordereddict for python2.6 only (#6931) * Vendor ordereddict for python2.6 only This commit substitutes the custom module 'ordereddict_backport' with the more known 'ordereddict' and vendors it only for python 2.6. Other supported versions of python will use 'collections.OrderedDict'. * Use absolute imports also for python 2.6 See PEP-328 for more information on the subject * Added provenance of vendored ordereddict --- bin/spack | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/spack b/bin/spack index 51dbce695b..e9278ddc4c 100755 --- a/bin/spack +++ b/bin/spack @@ -43,6 +43,10 @@ sys.path.insert(0, spack_lib_path) # Add external libs spack_external_libs = os.path.join(spack_lib_path, "external") + +if sys.version_info[:2] == (2, 6): + sys.path.insert(0, os.path.join(spack_external_libs, 'py26')) + sys.path.insert(0, spack_external_libs) # Handle vendoring of YAML specially, as it has two versions. -- cgit v1.2.3-60-g2f50