summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAlex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>2024-02-24 07:25:59 -0800
committerGitHub <noreply@github.com>2024-02-24 09:25:59 -0600
commit95fdc92c1f7852d24e68e19ec7c366594b3f9484 (patch)
tree34e64a5dd6f586b22e3a0f2024846d9e3d4678c6 /var
parent6680c6b72e9e1c6c461b66065433c467b23ed9b4 (diff)
downloadspack-95fdc92c1f7852d24e68e19ec7c366594b3f9484.tar.gz
spack-95fdc92c1f7852d24e68e19ec7c366594b3f9484.tar.bz2
spack-95fdc92c1f7852d24e68e19ec7c366594b3f9484.tar.xz
spack-95fdc92c1f7852d24e68e19ec7c366594b3f9484.zip
Allow awscli-v2 to be installed without examples/ dir (#42773)
* Allow awscli-v2 to be installed without examples/ dir * [@spackbot] updating style on behalf of AlexanderRichert-NOAA * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/awscli-v2/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/awscli-v2/package.py b/var/spack/repos/builtin/packages/awscli-v2/package.py
index 821321e622..dfa354430a 100644
--- a/var/spack/repos/builtin/packages/awscli-v2/package.py
+++ b/var/spack/repos/builtin/packages/awscli-v2/package.py
@@ -29,3 +29,11 @@ class AwscliV2(PythonPackage):
depends_on("py-python-dateutil@2.1:2", type=("build", "run"))
depends_on("py-jmespath@0.7.1:1.0", type=("build", "run"))
depends_on("py-urllib3@1.25.4:1.26", type=("build", "run"))
+
+ variant("examples", default=True, description="Install code examples")
+
+ @run_after("install")
+ @when("~examples")
+ def post_install(self):
+ examples_dir = join_path(python_purelib, "awscli", "examples")
+ remove_directory_contents(examples_dir)