From 8a1de8943269bc438dee53defaed7ed4422c0330 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Tue, 26 Oct 2021 21:28:58 +0200 Subject: gnu: Add python-ipaddress. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-ipaddress): New variable; (python2-ipaddress): Use package-with-python2. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index db2ab8e5f0..701ff31990 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11419,9 +11419,9 @@ (define-public python-pyasn1-modules (define-public python2-pyasn1-modules (package-with-python2 python-pyasn1-modules)) -(define-public python2-ipaddress +(define-public python-ipaddress (package - (name "python2-ipaddress") + (name "python-ipaddress") (version "1.0.23") (source (origin (method url-fetch) @@ -11430,17 +11430,17 @@ (define-public python2-ipaddress (base32 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p")))) (build-system python-build-system) - (arguments - `(#:python ,python-2)) (home-page "https://github.com/phihag/ipaddress") (synopsis "IP address manipulation library") (description "This package provides a fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create, poke at, and manipulate IPv4 and - IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress - module to older versions of Python.") + IPv6 addresses and networks.") (license license:psfl))) +(define-public python2-ipaddress + (package-with-python2 python-ipaddress)) + (define-public python-asn1tools (package (name "python-asn1tools") -- cgit v1.2.3 From 365260f4cd2d284d57df739ed41dc8e023059f00 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 5 Nov 2021 01:58:34 +0000 Subject: gnu: Update awscli, python-boto3 and python-botocore. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit awscli, botocore and boto3 work together and typically require matching versions. * gnu/packages/python-xyz.scm (python-botocore): Update to 1.22.11. (python-boto3): Update to 1.19.11. [native-inputs]: Add python-pytest. * gnu/packages/python-web.scm (awscli): Update to 1.21.11. Signed-off-by: Ludovic Courtès --- gnu/packages/python-web.scm | 4 ++-- gnu/packages/python-xyz.scm | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9e7d4113ab..964a045049 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2876,14 +2876,14 @@ (define-public awscli (package ;; Note: updating awscli typically requires updating botocore as well. (name "awscli") - (version "1.18.203") + (version "1.21.11") (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 (base32 - "128zg24961j8nmnq2dxqg6a7zwh3qgv87cmvclsdqwwih9nigxv9")))) + "0fkivwbx4nind5b7l4jhqm5bb9drgqsclcslrg4aggf9rcs4g4s0")))) (build-system python-build-system) (arguments ;; FIXME: The 'pypi' release does not contain tests. diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 701ff31990..6d0150811f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13731,14 +13731,14 @@ (define-public python-botocore ;; are compatible. (package (name "python-botocore") - (version "1.19.22") + (version "1.22.11") (source (origin (method url-fetch) (uri (pypi-uri "botocore" version)) (sha256 (base32 - "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7")))) + "1z7g2scyzvfq4yj9b4w911k7802ry1v6lqfnwq12l0ak7ywmsvrh")))) (build-system python-build-system) (arguments ;; FIXME: Many tests are failing. @@ -13759,7 +13759,7 @@ (define-public python2-botocore (define-public python-boto3 (package (name "python-boto3") - (version "1.16.22") + (version "1.19.11") (home-page "https://github.com/boto/boto3") (source (origin (method git-fetch) @@ -13767,19 +13767,19 @@ (define-public python-boto3 (file-name (git-file-name name version)) (sha256 (base32 - "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3")))) + "1wv0ci2z5ywvm63dh4mp64vqyyvkm4qxc8dxv8ncrqiiphpgr9aq")))) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'delete-network-tests ;; Deleting integration tests because they are trying to connect to AWS. - (lambda _ - (delete-file-recursively "tests/integration") - #t))))) + (lambda _ + (delete-file-recursively "tests/integration")))))) (build-system python-build-system) (native-inputs `(("python-nose" ,python-nose) - ("python-mock" ,python-mock))) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest))) (propagated-inputs `(("python-botocore" ,python-botocore) ("python-jmespath" ,python-jmespath) -- cgit v1.2.3 From 7a34e56dc811d75c2d4665d68e0f646abeaf28d9 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 5 Nov 2021 01:58:35 +0000 Subject: gnu: python-moto: Update to 2.2.12. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-moto): Update to 2.2.12. [arguments]: Make some cosmetic changes. <#:phases>: Don't return #t. Support cross-compilation in 'patch-hardcoded-executable-names. Skip more tests and simplify the custom 'check phase. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 51 ++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6d0150811f..6ed2407958 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13353,34 +13353,41 @@ (define-public python2-colorama (define-public python-moto (package (name "python-moto") - ;; XXX: Use a pre-release for compatibility with latest botocore & friends. - (version "1.3.16.dev134") + (version "2.2.12") (source (origin (method url-fetch) (uri (pypi-uri "moto" version)) (sha256 (base32 - "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd")))) + "0pvay0jp119lzzwf5qj5h6311271yq0w2i6344ds20grpf6g6gz8")))) (build-system python-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-hardcoded-executable-names - (lambda _ - (substitute* "moto/batch/models.py" - (("/bin/sh") - (which "sh"))) - (substitute* (find-files "tests" "\\.py$") - (("#!/bin/bash") - (string-append "#!" (which "bash")))) - #t)) - (replace 'check - (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv" "-m" "not network" - ;; These tests require Docker. - "-k" "not test_terminate_job \ -and not test_invoke_function_from_sqs_exception")))))) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-executable-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash-exec (string-append + (assoc-ref inputs "bash") + "/bin/sh"))) + (substitute* "moto/batch/models.py" + (("/bin/sh") bash-exec)) + (substitute* (find-files "tests" "\\.py$") + (("#!/bin/bash") (string-append "#!" bash-exec)))))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-m" "not network" "-k" + (string-append + ;; These tests require Docker. + "not test_terminate_job" + " and not test_invoke_function_from_sqs_exception" + " and not test_rotate_secret_lambda_invocations" + ;; These tests also require the network. + " and not test_put_record_batch_http_destination" + " and not test_put_record_http_destination" + " and not test_dependencies" + " and not test_cancel_running_job" + " and not test_container_overrides"))))))) (native-inputs `(("python-flask" ,python-flask) ("python-flask-cors" ,python-flask-cors) @@ -13388,6 +13395,8 @@ (define-public python-moto ("python-parameterized" ,python-parameterized) ("python-pytest" ,python-pytest) ("python-sure" ,python-sure))) + (inputs + `(("bash" ,bash-minimal))) (propagated-inputs `(("python-aws-xray-sdk" ,python-aws-xray-sdk) ("python-boto" ,python-boto) -- cgit v1.2.3 From 8bb6c7425d6edf532f2db1be5d09d26af6431e89 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Fri, 5 Nov 2021 01:58:36 +0000 Subject: gnu: python-moto: Honor #:tests? flag. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-moto)[arguments]: Adjust custom 'check phase to honor the #:tests? flag. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6ed2407958..b3a350aca4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13374,20 +13374,21 @@ (define-public python-moto (substitute* (find-files "tests" "\\.py$") (("#!/bin/bash") (string-append "#!" bash-exec)))))) (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "-m" "not network" "-k" - (string-append - ;; These tests require Docker. - "not test_terminate_job" - " and not test_invoke_function_from_sqs_exception" - " and not test_rotate_secret_lambda_invocations" - ;; These tests also require the network. - " and not test_put_record_batch_http_destination" - " and not test_put_record_http_destination" - " and not test_dependencies" - " and not test_cancel_running_job" - " and not test_container_overrides"))))))) + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-m" "not network" "-k" + (string-append + ;; These tests require Docker. + "not test_terminate_job" + " and not test_invoke_function_from_sqs_exception" + " and not test_rotate_secret_lambda_invocations" + ;; These tests also require the network. + " and not test_put_record_batch_http_destination" + " and not test_put_record_http_destination" + " and not test_dependencies" + " and not test_cancel_running_job" + " and not test_container_overrides")))))))) (native-inputs `(("python-flask" ,python-flask) ("python-flask-cors" ,python-flask-cors) -- cgit v1.2.3