summaryrefslogtreecommitdiff
path: root/lib/spack/spack/cmd/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/cmd/urls.py')
-rw-r--r--lib/spack/spack/cmd/urls.py59
1 files changed, 0 insertions, 59 deletions
diff --git a/lib/spack/spack/cmd/urls.py b/lib/spack/spack/cmd/urls.py
deleted file mode 100644
index 4ff23e69c1..0000000000
--- a/lib/spack/spack/cmd/urls.py
+++ /dev/null
@@ -1,59 +0,0 @@
-##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
-# Produced at the Lawrence Livermore National Laboratory.
-#
-# This file is part of Spack.
-# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
-# LLNL-CODE-647188
-#
-# For details, see https://github.com/llnl/spack
-# Please also see the LICENSE file for our notice and the LGPL.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License (as
-# published by the Free Software Foundation) version 2.1, February 1999.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
-# conditions of the GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##############################################################################
-import spack
-import spack.url
-
-description = "inspect urls used by packages in spack"
-
-
-def setup_parser(subparser):
- subparser.add_argument(
- '-c', '--color', action='store_true',
- help="color the parsed version and name in the urls shown. "
- "version will be cyan, name red")
- subparser.add_argument(
- '-e', '--extrapolation', action='store_true',
- help="color the versions used for extrapolation as well. "
- "additional versions are green, names magenta")
-
-
-def urls(parser, args):
- urls = set()
- for pkg in spack.repo.all_packages():
- url = getattr(pkg.__class__, 'url', None)
- if url:
- urls.add(url)
-
- for params in pkg.versions.values():
- url = params.get('url', None)
- if url:
- urls.add(url)
-
- for url in sorted(urls):
- if args.color or args.extrapolation:
- print spack.url.color_url(
- url, subs=args.extrapolation, errors=True)
- else:
- print url