From 6dff42be0973c5949d836eab51cfdffb0eda0a69 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 17 Sep 2015 00:21:33 -0700 Subject: WIP for Matt's branch --- bin/spack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/spack b/bin/spack index 5c042edd2d..baf08d1481 100755 --- a/bin/spack +++ b/bin/spack @@ -113,8 +113,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.packages import PackageFinder + spack.db.swap(PackageFinder(spack.mock_packages_path)) # If the user asked for it, don't check ssl certs. if args.insecure: -- cgit v1.2.3-70-g09d2 From c5ed7e2a15fe1b0a07cd50bbeee599e09f00a140 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 25 Nov 2015 18:33:52 -0800 Subject: On systems which have already installed nose (perhaps an older version) importing nose (which is also in Spack's external/ directory) outputs a warning (since there is more than one nose package). This avoids printing the warning to the user. --- bin/spack | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin') diff --git a/bin/spack b/bin/spack index e92d7cc273..b4f715ab60 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.simplefilter("ignore") + 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 -- cgit v1.2.3-70-g09d2 From a338e0efd5464a40d2e206ed00af99e5dcc53a79 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 28 Nov 2015 16:21:31 -0800 Subject: Fix spack.db -> spack.repo in bin/spack --- bin/spack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/spack b/bin/spack index efa1ccc281..18fd1f0f34 100755 --- a/bin/spack +++ b/bin/spack @@ -113,8 +113,8 @@ def main(): spack.spack_working_dir = working_dir if args.mock: - from spack.packages import PackageFinder - spack.db.swap(PackageFinder(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: -- cgit v1.2.3-70-g09d2 From b98b6122044a40e195c4d868ae33890d59b2f0ea Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 2 Dec 2015 18:10:28 -0800 Subject: Try to be more careful to only suppress the warning about nose already being imported. Other warnings should be output. --- bin/spack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/spack b/bin/spack index b4f715ab60..45be6ee0ff 100755 --- a/bin/spack +++ b/bin/spack @@ -46,7 +46,7 @@ import warnings # spack. Note this must be done after Spack's external libs directory is added # to sys.path. with warnings.catch_warnings(): - warnings.simplefilter("ignore") + warnings.filterwarnings("ignore", ".*nose was already imported") import nose # Quick and dirty check to clean orphaned .pyc files left over from -- cgit v1.2.3-70-g09d2