From patchwork Sat Aug 28 07:48:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 32343 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3428827BBE4; Sat, 28 Aug 2021 08:49:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B6A8427BBE3 for ; Sat, 28 Aug 2021 08:49:08 +0100 (BST) Received: from localhost ([::1]:48576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJt5P-0008EF-R5 for patchwork@mira.cbaines.net; Sat, 28 Aug 2021 03:49:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJt5K-0008E6-IS for guix-patches@gnu.org; Sat, 28 Aug 2021 03:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJt5K-0001Qf-7X for guix-patches@gnu.org; Sat, 28 Aug 2021 03:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJt5K-0002Xt-3X for guix-patches@gnu.org; Sat, 28 Aug 2021 03:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50235] [PATCH] gnu: trash-cli: Update to 0.21.7.24. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Aug 2021 07:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50235@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16301369309764 (code B ref -1); Sat, 28 Aug 2021 07:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Aug 2021 07:48:50 +0000 Received: from localhost ([127.0.0.1]:53349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJt58-0002XP-2A for submit@debbugs.gnu.org; Sat, 28 Aug 2021 03:48:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:51984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJt54-0002XG-Dj for submit@debbugs.gnu.org; Sat, 28 Aug 2021 03:48:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJt54-0008Dl-5B for guix-patches@gnu.org; Sat, 28 Aug 2021 03:48:46 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:37493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJt51-00016j-TI for guix-patches@gnu.org; Sat, 28 Aug 2021 03:48:45 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 40702200003 for ; Sat, 28 Aug 2021 07:48:37 +0000 (UTC) From: Brice Waegeneire Date: Sat, 28 Aug 2021 09:48:30 +0200 Message-Id: <20210828074830.6325-1-brice@waegenei.re> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.178.232; envelope-from=brice@waegenei.re; helo=relay12.mail.gandi.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/shellutils.scm (trash-cli): Update to 0.21.7.24. [source]: Use github repository instead of pypi. [arguments]: Use python 3. : Enable tests. : 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. base-commit: 4716d544443f25a4cd1397d9f8deb856e28bb515 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