diff options
author | Erik Schnetter <schnetter@gmail.com> | 2016-02-12 12:55:26 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2016-02-12 12:55:26 -0500 |
commit | 64436e77524f317811e27cf4a269b659de441892 (patch) | |
tree | 3268a403b687736413e172e7957480ba41a62c16 /bin | |
parent | 9017ec5865615f3e1505501f1eb9b30000e217e9 (diff) | |
parent | bcf705b85e82509a5045a52a3420893c5546ee7f (diff) | |
download | spack-64436e77524f317811e27cf4a269b659de441892.tar.gz spack-64436e77524f317811e27cf4a269b659de441892.tar.bz2 spack-64436e77524f317811e27cf4a269b659de441892.tar.xz spack-64436e77524f317811e27cf4a269b659de441892.zip |
Merge branch 'develop' into correct-cc
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: |