
* fix remaining flake8 errors * imports: sort imports everywhere in Spack We enabled import order checking in #23947, but fixing things manually drives people crazy. This used `spack style --fix --all` from #24071 to automatically sort everything in Spack so PR submitters won't have to deal with it. This should go in after #24071, as it assumes we're using `isort`, not `flake8-import-order` to order things. `isort` seems to be more flexible and allows `llnl` mports to be in their own group before `spack` ones, so this seems like a good switch.
36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
import datetime
|
|
|
|
from spack import *
|
|
|
|
|
|
class HttpPing(MakefilePackage):
|
|
"""http_ping is like the regular ping command, except that it sends
|
|
HTTP requests instead of ICMP echo requests."""
|
|
|
|
homepage = "https://www.acme.com/software/http_ping/"
|
|
url = "https://www.acme.com/software/http_ping/http_ping_09Mar2016.tar.gz"
|
|
|
|
version('2016-03-09', sha256='f8b95773aaed09839a44a1927f979a62752d57aace79da3846bfb73e6c9805e9')
|
|
|
|
def url_for_version(self, version):
|
|
ver = datetime.datetime.strptime(str(version), '%Y-%m-%d').date()
|
|
verstr = datetime.datetime.strftime(ver, '%d%b%Y')
|
|
return "https://www.acme.com/software/http_ping/http_ping_{0}.tar.gz".format(verstr)
|
|
|
|
def edit(self, spec, prefix):
|
|
makefile = FileFilter("Makefile")
|
|
makefile.filter("BINDIR =\t/usr/local/bin",
|
|
"BINDIR = {0}/bin".format(self.prefix))
|
|
makefile.filter("MANDIR =\t/usr/local/man/man1",
|
|
"MANDIR={0}/man/man1".format(self.prefix))
|
|
|
|
def install(self, spec, prefix):
|
|
mkdirp(prefix.bin)
|
|
mkdirp(prefix.man.man1)
|
|
make('install')
|