@@ -364,26 +364,47 @@ WSGI. This package includes libraries for implementing ASGI servers.")
(package
(name "python-aws-sam-translator")
(version "1.38.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "aws-sam-translator" version))
- (sha256
- (base32
- "1djwlsjpbh13m4biglimrm9lq7hmla0k29giay7k3cjsrylxvjhf"))))
+ (source
+ (origin
+ ;; PyPI tarball does not include tests.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aws/serverless-application-model")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0nn9jfqz13kzmxm0r9vy24p8sqxv3mrm5d3lx7ah6rc581q8nv1k"))))
(build-system python-build-system)
(arguments
- `(;; XXX: Tests are not distributed with the PyPI archive, and would
- ;; introduce a circular dependency on python-cfn-lint.
- #:tests? #f
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'loosen-requirements
- (lambda _
- ;; The package needlessly specifies exact versions
- ;; of dependencies, when it works fine with others.
- (substitute* "requirements/base.txt"
- (("(.*)(~=[0-9\\.]+)" all package version)
- package))
- #t)))))
+ ;; 25 test failures divided in the following two errors:
+ ;; 'botocore.exceptions.NoRegionError: You must specify a region.'
+ ;; AttributeError: 'TestDeploymentPreferenceCollection' object has
+ ;; no attribute 'function_logical_id'.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ ;; The package needlessly specifies exact versions
+ ;; of dependencies, when it works fine with others.
+ (substitute* "requirements/base.txt"
+ (("(.*)(~=[0-9\\.]+)" all package version)
+ package)))))))
+ (native-inputs
+ `(("python-black" ,python-black)
+ ("python-click" ,python-click)
+ ("python-coverage" ,python-coverage)
+ ("python-dateparser" ,python-dateparser)
+ ("python-docopt" ,python-docopt)
+ ("python-flake8" ,python-flake8)
+ ("python-mock" ,python-mock)
+ ("python-parameterized" ,python-parameterized)
+ ("python-pathlib2" ,python-pathlib2)
+ ("python-pylint" ,python-pylint)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-requests" ,python-requests)))
(propagated-inputs
`(("python-boto3" ,python-boto3)
("python-jsonschema" ,python-jsonschema)