summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAndreas Baumbach <healther@users.noreply.github.com>2018-07-15 02:20:49 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2018-07-14 17:20:49 -0700
commit79b407f59e7a9ef73d95d087c0e2bba31952c643 (patch)
tree5a9201d91ffc9f5856fd7be7756b3404d8a25f76 /bin
parent5192a3d6d6566c7edde246020ca7ebd48697d957 (diff)
downloadspack-79b407f59e7a9ef73d95d087c0e2bba31952c643.tar.gz
spack-79b407f59e7a9ef73d95d087c0e2bba31952c643.tar.bz2
spack-79b407f59e7a9ef73d95d087c0e2bba31952c643.tar.xz
spack-79b407f59e7a9ef73d95d087c0e2bba31952c643.zip
clean up of spack clean (#8610)
* update help of `clean --all` to include `-p` * remove old orphaned `.pyc` removal * restrict removal or orphaned pyc files to `lib/spack` and `var/spack`
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack24
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/spack b/bin/spack
index 78f5b7977f..80e47caa1a 100755
--- a/bin/spack
+++ b/bin/spack
@@ -56,30 +56,6 @@ else:
spack_yaml_libs = os.path.join(spack_external_libs, "yaml/lib3")
sys.path.insert(0, spack_yaml_libs)
-# 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
-# imports. If we leave them, Spack will fail in mysterious ways.
-# TODO: more elegant solution for orphaned pyc files.
-orphaned_pyc_files = [
- os.path.join(spack_external_libs, 'functools.pyc'),
- os.path.join(spack_external_libs, 'ordereddict.pyc'),
- os.path.join(spack_lib_path, 'spack', 'platforms', 'cray_xc.pyc'),
- os.path.join(spack_lib_path, 'spack', 'cmd', 'package-list.pyc'),
- os.path.join(spack_lib_path, 'spack', 'cmd', 'test-install.pyc'),
- os.path.join(spack_lib_path, 'spack', 'cmd', 'url-parse.pyc'),
- os.path.join(spack_lib_path, 'spack', 'test', 'yaml.pyc')
-]
-
-for pyc_file in orphaned_pyc_files:
- if not os.path.exists(pyc_file):
- continue
- try:
- os.remove(pyc_file)
- except OSError as e:
- print("WARNING: Spack may fail mysteriously. "
- "Couldn't remove orphaned .pyc file: %s" % pyc_file)
-
# Once we've set up the system path, run the spack main method
import spack.main # noqa
sys.exit(spack.main.main())