[bug#34398] gnu: Add python-backports-shutil-which.

Message ID 87k1i9v5ka.fsf@ponder
State Accepted
Headers show
Series [bug#34398] gnu: Add python-backports-shutil-which. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Vagrant Cascadian Feb. 9, 2019, 6:28 a.m. UTC
* gnu/packages/python-xyz.scm
  (python-backports-shutil-which): New variable.
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Danny Milosavljevic Feb. 11, 2019, 9:54 a.m. UTC | #1
Hi Vagrant,

On Fri, 08 Feb 2019 22:28:37 -0800
Vagrant Cascadian <vagrant@debian.org> wrote:

> +    (synopsis
> +     "Backport of shutil.which from Python 3.3")
> +    (description
> +     "Python-backports-shutil-which provides a backport of shutil.which from
> +Python 3.3")

Why do we need this package?  We have Python 3.7.0.
Doesn't that contain the same module already?
Vagrant Cascadian Feb. 11, 2019, 10:07 p.m. UTC | #2
On 2019-02-11, Danny Milosavljevic wrote:
> On Fri, 08 Feb 2019 22:28:37 -0800
> Vagrant Cascadian <vagrant@debian.org> wrote:
>
>> +    (synopsis
>> +     "Backport of shutil.which from Python 3.3")
>> +    (description
>> +     "Python-backports-shutil-which provides a backport of shutil.which from
>> +Python 3.3")
>
> Why do we need this package?  We have Python 3.7.0.
> Doesn't that contain the same module already?

I found it odd as well, but I couldn't figure out how to get the newer
versions of python-trezor-agent to build without
python-backports-shutil-which without patching python-trezor-agent.

I didn't spend too much effort looking into patching it; I'll take a
little deeper look.

Thanks for all the reviews!


live well,
  vagrant
Vagrant Cascadian Feb. 12, 2019, 7:02 a.m. UTC | #3
On 2019-02-11, Vagrant Cascadian wrote:
> On 2019-02-11, Danny Milosavljevic wrote:
>> On Fri, 08 Feb 2019 22:28:37 -0800
>> Vagrant Cascadian <vagrant@debian.org> wrote:
>>> +    (synopsis
>>> +     "Backport of shutil.which from Python 3.3")
>>> +    (description
>>> +     "Python-backports-shutil-which provides a backport of shutil.which from
>>> +Python 3.3")
>>
>> Why do we need this package?  We have Python 3.7.0.
>> Doesn't that contain the same module already?
>
> I found it odd as well, but I couldn't figure out how to get the newer
> versions of python-trezor-agent to build without
> python-backports-shutil-which without patching python-trezor-agent.
>
> I didn't spend too much effort looking into patching it; I'll take a
> little deeper look.

I don't see a need for this package anymore; I submitted an update for
python-trezor-agent/trezor-agent that fixes the issue without using
backports.shutil_which.

A slightly deeper look into: Lacking backports.shutil_which caused
"trezor-agent" to fail during tests as it tried to download the missing
library, but there was no mention of shutil_which at all in any of it's
code... turned out "python-trezor-agent" had an overly strict requires
on the backported.shutil_which, even though "python-trezor-agent"
supports the shutil_which included in newer python versions. Simply
removing the backports.shutil_which from "python-trezor-agent" requires
fixed the issue.

Thanks!

live well,
  vagrant
Simon Tournier April 7, 2022, 12:08 p.m. UTC | #4
Hi,

On Mon, 11 Feb 2019 at 23:02, Vagrant Cascadian <vagrant@debian.org> wrote:

> I don't see a need for this package anymore; I submitted an update for
> python-trezor-agent/trezor-agent that fixes the issue without using
> backports.shutil_which.

Therefore, closing.  Let me know if I have missed a point.


Cheers,
simon

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 086eb3af26..143d9c2ffc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -317,6 +317,31 @@  etc. ")
 (define-public python2-babel
   (package-with-python2 python-babel))
 
+(define-public python-backports-shutil-which
+  (package
+    (name "python-backports-shutil-which")
+    (version "3.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "backports.shutil_which" version))
+       (sha256
+        (base32
+         "0cy16w2dpv110afncag8x1zhzy3yz0iypny4iagdiyp4rdkzafgy"))))
+    (build-system python-build-system)
+    (home-page
+     "https://github.com/minrk/backports.shutil_which")
+    (synopsis
+     "Backport of shutil.which from Python 3.3")
+    (description
+     "Python-backports-shutil-which provides a backport of shutil.which from
+Python 3.3")
+    ;; The backported code is "psfl" license, setup.py is under "MIT" license.
+    (license
+     (list license:psfl
+           (license:non-copyleft
+            "https://raw.githubusercontent.com/minrk/backports.shutil_which/master/LICENSE")))))
+
 (define-public python2-backport-ssl-match-hostname
   (package
     (name "python2-backport-ssl-match-hostname")