summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-01-26 08:59:25 +0100
committeralalazo <massimiliano.culpo@googlemail.com>2016-01-26 08:59:25 +0100
commit6f11a64af5b994b31100e0313c25dfb4f6227255 (patch)
tree35949b8c513849b4bee4b0c2b73e6f9fd1b58084 /bin
parentd95d169ac50a3c253ef9712782626af1e1610ca7 (diff)
parent1a5270023803303f07db507fa36139fb52111b9d (diff)
downloadspack-6f11a64af5b994b31100e0313c25dfb4f6227255.tar.gz
spack-6f11a64af5b994b31100e0313c25dfb4f6227255.tar.bz2
spack-6f11a64af5b994b31100e0313c25dfb4f6227255.tar.xz
spack-6f11a64af5b994b31100e0313c25dfb4f6227255.zip
Merge branch 'develop' of https://github.com/LLNL/spack into refactoring/resource_directive
Conflicts: lib/spack/spack/fetch_strategy.py lib/spack/spack/mirror.py lib/spack/spack/package.py
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/spack b/bin/spack
index cd46cf6180..31165bba9d 100755
--- a/bin/spack
+++ b/bin/spack
@@ -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: