GNU bug report logs - #50235
[PATCH] gnu: trash-cli: Update to 0.21.7.24.

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Sat, 28 Aug 2021 07:49:01 UTC

Severity: normal

Tags: patch

Done: Brice Waegeneire <brice <at> waegenei.re>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50235 in the body.
You can then email your comments to 50235 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50235; Package guix-patches. (Sat, 28 Aug 2021 07:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Waegeneire <brice <at> waegenei.re>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 28 Aug 2021 07:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: trash-cli: Update to 0.21.7.24.
Date: Sat, 28 Aug 2021 09:48:30 +0200
* gnu/packages/shellutils.scm (trash-cli): Update to 0.21.7.24.
  [source]: Use github repository instead of pypi.
  [arguments]<python>: Use python 3.
  <tests>: Enable tests.
  <phases>: Add "fix-setup.py" phase.
  [native-inputs]: Add python-pytest, python-mock and python-six.
  [propagated-inputs]: Add python-psutil.
---
 gnu/packages/shellutils.scm | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

The switch from PyPi to Github is to get the "test" directory to be able to
run the tests.

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 94b5536df7..7c153cdf25 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -38,11 +38,13 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages golang)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
@@ -203,19 +205,20 @@ between various shells or commands.")
 (define-public trash-cli
   (package
     (name "trash-cli")
-    (version "0.17.1.14")
+    (version "0.21.7.24")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "trash-cli" version))
-       (sha256
-        (base32
-         "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/andreafrancia/trash-cli")
+            (commit version)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "082mfl4mza4xkm3fdn5aka9rsbd8c149qj3cqqk62idrnszmgzg5"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f ; no tests
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-before 'build 'patch-path-constants
            (lambda* (#:key inputs #:allow-other-keys)
@@ -225,8 +228,22 @@ between various shells or commands.")
                  (("\"/lib/libc.so.6\".*")
                   (string-append "\"" libc "/lib/libc.so.6\"\n"))
                  (("\"df\"")
-                  (string-append "\"" coreutils "/bin/df\"")))))))))
+                  (string-append "\"" coreutils "/bin/df\""))))))
+         (add-before 'build 'fix-setup.py
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (substitute* "setup.py"
+                 (("add_script\\('")
+                  (string-append "add_script('" bin "/" )))))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-mock" ,python-mock)
+       ("python-six" ,python-six)))
     (inputs `(("coreutils" ,coreutils)))
+    (propagated-inputs
+     `(("python-psutil" ,python-psutil)))
     (home-page "https://github.com/andreafrancia/trash-cli")
     (synopsis "Trash can management tool")
     (description

base-commit: 4716d544443f25a4cd1397d9f8deb856e28bb515
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#50235; Package guix-patches. (Fri, 24 Sep 2021 11:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 50235 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 50235 <at> debbugs.gnu.org
Subject: Re: bug#50235: [PATCH] gnu: trash-cli: Update to 0.21.7.24.
Date: Fri, 24 Sep 2021 13:56:46 +0200
Hi Brice,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> * gnu/packages/shellutils.scm (trash-cli): Update to 0.21.7.24.
>   [source]: Use github repository instead of pypi.
>   [arguments]<python>: Use python 3.
>   <tests>: Enable tests.
>   <phases>: Add "fix-setup.py" phase.
>   [native-inputs]: Add python-pytest, python-mock and python-six.
>   [propagated-inputs]: Add python-psutil.

LGTM!

Ludo’.




Reply sent to Brice Waegeneire <brice <at> waegenei.re>:
You have taken responsibility. (Tue, 18 Jan 2022 08:00:02 GMT) Full text and rfc822 format available.

Notification sent to Brice Waegeneire <brice <at> waegenei.re>:
bug acknowledged by developer. (Tue, 18 Jan 2022 08:00:03 GMT) Full text and rfc822 format available.

Message #13 received at 50235-done <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 50235-done <at> debbugs.gnu.org
Subject: Re: bug#50235: [PATCH] gnu: trash-cli: Update to 0.21.7.24.
Date: Tue, 18 Jan 2022 08:58:53 +0100
Hello Ludo’,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Brice Waegeneire <brice <at> waegenei.re> skribis:
>
>> * gnu/packages/shellutils.scm (trash-cli): Update to 0.21.7.24.
>>   [source]: Use github repository instead of pypi.
>>   [arguments]<python>: Use python 3.
>>   <tests>: Enable tests.
>>   <phases>: Add "fix-setup.py" phase.
>>   [native-inputs]: Add python-pytest, python-mock and python-six.
>>   [propagated-inputs]: Add python-psutil.
>
> LGTM!

Thank for the review!

Pushed as 39510d5a5e4e0e38cd3d3bc944d5bf6d96242493, adjusted from the initial
patch to update to 0.21.10.24 and use new inputs style.

Cheers,
- Brice




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Feb 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.