@@ -4257,9 +4257,78 @@ (define-public awscli
Amazon Web Services (AWS) API.")
(license license:asl2.0)))
+(define-public awscli-2
+ (package
+ (inherit awscli)
+ (name "awscli")
+ (version "2.20.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aws/aws-cli")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hyr9gmcfk7nzkgs0v6wgkh8k15dyhknqzfymbc9a9sa2dblc40q"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'ignore-deprecations
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("\"error::") "\"ignore::"))))
+ (add-after 'unpack 'remove-pep517
+ (lambda _
+ (rename-file "backends/pep517.py" "backends/dummypep517.py")
+ (substitute* "pyproject.toml"
+ (("pep517") "dummypep517"))
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) ":"
+ (getcwd) "/backends:"
+ (getenv "GUIX_PYTHONPATH")))))
+ (add-after 'unpack 'fix-reference-to-groff
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "awscli/help.py"
+ (("if self._exists_on_path\\('groff'\\):") "if True:")
+ (("cmdline = \\['groff'")
+ (string-append "cmdline = ['"
+ (search-input-file inputs "bin/groff")
+ "'")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (substitute* "scripts/ci/run-tests"
+ (("--numprocesses=auto --dist=loadfile --maxprocesses=4") ""))
+ ;; For an unknown reason pytest receives SIGTERM and no tests
+ ;; are run..
+ #;
+ (invoke "python" "scripts/ci/run-tests")))))))
+ (inputs
+ (list groff
+ python-awscrt-for-awscli
+ python-colorama
+ python-botocore
+ python-cryptography
+ python-dateutil
+ python-docutils
+ python-jmespath
+ python-prompt-toolkit
+ python-ruamel.yaml-0.16
+ python-ruamel.yaml.clib
+ python-urllib3))
+ (native-inputs
+ (list python-distro
+ python-flit
+ python-pytest
+ python-wheel))))
+
;; This is not an official release of awscli version 2, so it should not be
;; named awscli.
-(define-public awscli-2
+(define-public awscliv2
(package
(inherit awscli)
(name "awscliv2")