diff options
| author | Danny Milosavljevic <dannym@scratchpost.org> | 2017-06-16 23:21:56 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@scratchpost.org> | 2017-06-17 20:43:11 +0200 |
| commit | 7ea498e5cd55c056492a778203414ce977350142 (patch) | |
| tree | fd7bd4ae0eeb16cc4100b25b0b10ca3bce59dfcd /gnu/packages/python.scm | |
| parent | b41704cd6d0653612bc94ecdba385aa8ff67b0c3 (diff) | |
gnu: Add python-apache-libcloud.
* gnu/packages/python.scm (python-apache-libcloud, python2-apache-libcloud):
New variables.
Diffstat (limited to 'gnu/packages/python.scm')
| -rw-r--r-- | gnu/packages/python.scm | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 352a5f3334d..92413aa458a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -98,6 +98,7 @@ | |||
| 98 | #:use-module (gnu packages readline) | 98 | #:use-module (gnu packages readline) |
| 99 | #:use-module (gnu packages sdl) | 99 | #:use-module (gnu packages sdl) |
| 100 | #:use-module (gnu packages shells) | 100 | #:use-module (gnu packages shells) |
| 101 | #:use-module (gnu packages ssh) | ||
| 101 | #:use-module (gnu packages statistics) | 102 | #:use-module (gnu packages statistics) |
| 102 | #:use-module (gnu packages tex) | 103 | #:use-module (gnu packages tex) |
| 103 | #:use-module (gnu packages texinfo) | 104 | #:use-module (gnu packages texinfo) |
| @@ -15324,3 +15325,61 @@ validating Swagger API specifications.") | |||
| 15324 | 15325 | ||
| 15325 | (define-public python2-swagger-spec-validator | 15326 | (define-public python2-swagger-spec-validator |
| 15326 | (package-with-python2 python-swagger-spec-validator)) | 15327 | (package-with-python2 python-swagger-spec-validator)) |
| 15328 | |||
| 15329 | (define-public python-apache-libcloud | ||
| 15330 | (package | ||
| 15331 | (name "python-apache-libcloud") | ||
| 15332 | (version "2.0.0") | ||
| 15333 | (source | ||
| 15334 | (origin | ||
| 15335 | (method url-fetch) | ||
| 15336 | (uri (pypi-uri "apache-libcloud" version)) | ||
| 15337 | (sha256 | ||
| 15338 | (base32 | ||
| 15339 | "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7")))) | ||
| 15340 | (build-system python-build-system) | ||
| 15341 | (arguments | ||
| 15342 | `(#:phases | ||
| 15343 | (modify-phases %standard-phases | ||
| 15344 | (add-after 'unpack 'patch-ssh | ||
| 15345 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 15346 | (substitute* "libcloud/compute/ssh.py" | ||
| 15347 | (("'ssh'") (string-append "'" (assoc-ref inputs "openssh") | ||
| 15348 | "/bin/ssh" "'"))) | ||
| 15349 | #t)) | ||
| 15350 | (add-after 'unpack 'patch-tests | ||
| 15351 | (lambda _ | ||
| 15352 | (substitute* "./libcloud/test/test_file_fixtures.py" | ||
| 15353 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>. | ||
| 15354 | (("def _ascii") "def _raw_data(self, method, url, body, headers): | ||
| 15355 | return (httplib.OK, | ||
| 15356 | \"1234abcd\", | ||
| 15357 | {\"test\": \"value\"}, | ||
| 15358 | httplib.responses[httplib.OK]) | ||
| 15359 | def _ascii")) | ||
| 15360 | (substitute* "libcloud/test/compute/test_ssh_client.py" | ||
| 15361 | (("class ShellOutSSHClientTests") | ||
| 15362 | "@unittest.skip(\"Guix container doesn't have ssh service\") | ||
| 15363 | class ShellOutSSHClientTests") | ||
| 15364 | ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>. | ||
| 15365 | (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") | ||
| 15366 | (("'.xF0', '.x90', '.x8D', '.x88'") | ||
| 15367 | "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) | ||
| 15368 | #t))))) | ||
| 15369 | (inputs | ||
| 15370 | `(("openssh" ,openssh))) | ||
| 15371 | (propagated-inputs | ||
| 15372 | `(("python-paramiko" ,python-paramiko) | ||
| 15373 | ("python-requests" ,python-requests))) | ||
| 15374 | (native-inputs | ||
| 15375 | `(("python-lockfile" ,python-lockfile) | ||
| 15376 | ("python-mock" ,python-mock) | ||
| 15377 | ("python-requests-mock" ,python-requests-mock))) | ||
| 15378 | (home-page "https://libcloud.apache.org/") | ||
| 15379 | (synopsis "Unified Cloud API") | ||
| 15380 | (description "@code{libcloud} is a Python library for interacting with | ||
| 15381 | many of the popular cloud service providers using a unified API.") | ||
| 15382 | (license license:asl2.0))) | ||
| 15383 | |||
| 15384 | (define-public python2-apache-libcloud | ||
| 15385 | (package-with-python2 python-apache-libcloud)) | ||
