Skip to content

Commit

Permalink
Add prebuilt version for awscli-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 27, 2023
1 parent c1b6bd5 commit b52cbeb
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions var/spack/repos/builtin/packages/awscli-v2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,43 @@
from spack.package import *


class AwscliV2(PythonPackage):
class AwscliV2(Package, PythonPackage):
"""This package provides a unified command line interface to Amazon Web Services."""

homepage = "https://docs.aws.amazon.com/cli"
url = "https://github.com/aws/aws-cli/archive/refs/tags/2.13.22.tar.gz"

maintainers("climbfuji")

version("latest", sha256="d045a8baafbe45ab87821b1a1019ba64683dbb2659e1b5ab985f869a52c1bef5")
version("2.13.22", sha256="dd731a2ba5973f3219f24c8b332a223a29d959493c8a8e93746d65877d02afc1")

depends_on("[email protected]:", type=("build", "run"))
depends_on("[email protected]:3.8.0", type=("build"))
depends_on("[email protected]:0.4.6", type=("build", "run"))
depends_on("[email protected]:0.19", type=("build", "run"))
depends_on("[email protected]:40.0.1", type=("build", "run"))
depends_on("[email protected]:0.17.21", type=("build", "run"))
depends_on("[email protected]:0.2.7", type=("build", "run"))
depends_on("[email protected]:3.0.38", type=("build", "run"))
depends_on("[email protected]:1.8", type=("build", "run"))
depends_on("[email protected]:0.16.16", type=("build", "run"))
depends_on("[email protected]:2", type=("build", "run"))
depends_on("[email protected]:1.0", type=("build", "run"))
depends_on("[email protected]:1.26", type=("build", "run"))
def url_for_version(self, version):
if version == Version("latest"):
return "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"
else:
return f"https://github.com/aws/aws-cli/archive/refs/tags/{version}.tar.gz"

build_system(conditional("generic", when="@latest"), "python_pip", default="python_pip")
requires("build_system=generic", when="@latest")

with when("build_system=python_pip"):
depends_on("[email protected]:", type=("build", "run"))
depends_on("[email protected]:3.8.0", type=("build"))
depends_on("[email protected]:0.4.6", type=("build", "run"))
depends_on("[email protected]:0.19", type=("build", "run"))
depends_on("[email protected]:40.0.1", type=("build", "run"))
depends_on("[email protected]:0.17.21", type=("build", "run"))
depends_on("[email protected]:0.2.7", type=("build", "run"))
depends_on("[email protected]:3.0.38", type=("build", "run"))
depends_on("[email protected]:1.8", type=("build", "run"))
depends_on("[email protected]:0.16.16", type=("build", "run"))
depends_on("[email protected]:2", type=("build", "run"))
depends_on("[email protected]:1.0", type=("build", "run"))
depends_on("[email protected]:1.26", type=("build", "run"))

@when("@latest")
def install(self, spec, prefix):
with working_dir(self.stage.source_path):
installer = which("./install")
installer("--install-dir", prefix, "--bin-dir", prefix.bin)

0 comments on commit b52cbeb

Please sign in to comment.