diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-01-28 11:26:01 +0100 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-01-28 11:26:01 +0100 |
commit | e76b722e28eedd94277e5d8ea42beeb5a8d5048e (patch) | |
tree | 647b1eb7202d973cadb0bf16bb3797da679cccdd /bin | |
parent | bf4231dd4b906f20d522b9df5f2cae2ba6291174 (diff) | |
parent | c2bb00ca2f925c1a8c4b49f7b0a7b22e7c0b43a8 (diff) | |
download | spack-e76b722e28eedd94277e5d8ea42beeb5a8d5048e.tar.gz spack-e76b722e28eedd94277e5d8ea42beeb5a8d5048e.tar.bz2 spack-e76b722e28eedd94277e5d8ea42beeb5a8d5048e.tar.xz spack-e76b722e28eedd94277e5d8ea42beeb5a8d5048e.zip |
Merge branch 'develop' of https://github.com/LLNL/spack into enhancement/os_detection
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spack | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -41,6 +41,14 @@ sys.path.insert(0, SPACK_LIB_PATH) SPACK_EXTERNAL_LIBS = os.path.join(SPACK_LIB_PATH, "external") sys.path.insert(0, SPACK_EXTERNAL_LIBS) +import warnings +# Avoid warnings when nose is installed with the python exe being used to run +# spack. Note this must be done after Spack's external libs directory is added +# to sys.path. +with warnings.catch_warnings(): + warnings.filterwarnings("ignore", ".*nose was already imported") + import nose + # Quick and dirty check to clean orphaned .pyc files left over from # previous revisions. These files were present in earlier versions of # Spack, were removed, but shadow system modules that Spack still @@ -54,7 +62,7 @@ for pyc_file in orphaned_pyc_files: try: os.remove(pyc_file) except OSError as e: - print "WARNING: Spack may fail mysteriously. Couldn't remove orphaned .pyc file: %s" % pyc + print "WARNING: Spack may fail mysteriously. Couldn't remove orphaned .pyc file: %s" % pyc_file # If there is no working directory, use the spack prefix. try: @@ -132,8 +140,8 @@ def main(): spack.spack_working_dir = working_dir if args.mock: - from spack.packages import PackageDB - spack.db = PackageDB(spack.mock_packages_path) + from spack.repository import RepoPath + spack.repo.swap(RepoPath(spack.mock_packages_path)) # If the user asked for it, don't check ssl certs. if args.insecure: |