Subject: Re: [bug#27400] [PATCH] gnu: Add python-apache-libcloud.

From: Marius Bakke <[email-masked]>
Date: Sat, 17 Jun 2017 15:37:27 +0200

Danny Milosavljevic <[email-masked]> writes:

> * gnu/packages/python.scm (python-apache-libcloud, python2-apache-libcloud):
> New variables.

[...]

> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch-ssh
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "libcloud/compute/ssh.py"
> +               (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
> +                                         "'")))

Should this not be (assoc-ref inputs "openssh") "/bin/ssh"?

> +             #t))
> +         (add-after 'unpack 'patch-tests
> +           (lambda _
> +             (substitute* "./libcloud/test/test_file_fixtures.py"
> +               ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
> +               (("def _ascii") "def _raw_data(self, method, url, body, headers):
> +        return (httplib.OK,
> +                \"1234abcd\",
> +                {\"test\": \"value\"},
> +                httplib.responses[httplib.OK])
> +    def _ascii"))
> +             (substitute* "libcloud/test/compute/test_ssh_client.py"
> +               (("class ShellOutSSHClientTests")
> +                "@unittest.skip(\"Guix container doesn't have ssh service\")
> +class ShellOutSSHClientTests")
> +               ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
> +               (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
> +               (("'.xF0', '.x90', '.x8D', '.x88'")
> +                "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))

Odd that these substitutions are necessary. Could it be something with
our Python build? Or locale in the build environment? LGTM, anyway.