From patchwork Tue Aug 31 11:15:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 32442 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 A6B5B27BBE3; Tue, 31 Aug 2021 12:16:23 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable 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 4A6F627BBE1 for ; Tue, 31 Aug 2021 12:16:23 +0100 (BST) Received: from localhost ([::1]:54722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL1kc-00076I-CU for patchwork@mira.cbaines.net; Tue, 31 Aug 2021 07:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL1kI-000753-HM for guix-patches@gnu.org; Tue, 31 Aug 2021 07:16:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mL1kI-0006xj-9m for guix-patches@gnu.org; Tue, 31 Aug 2021 07:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mL1kI-0004s7-67 for guix-patches@gnu.org; Tue, 31 Aug 2021 07:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49575] [PATCH v3] gnu: Add python-date2name. References: In-Reply-To: Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Aug 2021 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49575 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 49575@debbugs.gnu.org Received: via spool by 49575-submit@debbugs.gnu.org id=B49575.163040853518692 (code B ref 49575); Tue, 31 Aug 2021 11:16:02 +0000 Received: (at 49575) by debbugs.gnu.org; 31 Aug 2021 11:15:35 +0000 Received: from localhost ([127.0.0.1]:33155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL1jn-0004rM-Hd for submit@debbugs.gnu.org; Tue, 31 Aug 2021 07:15:35 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:19039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL1jh-0004r4-Am for 49575@debbugs.gnu.org; Tue, 31 Aug 2021 07:15:29 -0400 Date: Tue, 31 Aug 2021 11:15:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630408518; bh=p1cxJ+qybx/YmyBs8aNRnKQKaq6rIC1Kt81PwK4Ri4I=; h=Date:To:From:Cc:Reply-To:Subject:From; b=L0kYaPaq5Hbf6Ev8PuiJMvPwJ0zXiSwu/QE9fKIff+d1Mm5my/Iic3NgeeQGEd4G1 3s1uhcEPTx5bDpU71HppiUA8R7wnO1/6IYWHsxMsXKakKELsmJi00MFUqBGqhZkKVM xOsoCd8IT8rbtagRDyMqSfLIUEH54U55P00kNgB0= Message-ID: MIME-Version: 1.0 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi Ludo, thanks for the suggestions and excellent documentation! Here's the updated patch. ------------------------------------- * gnu/packages/python-check.scm (date2name): New variable. --- 2.32.0 diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 2a4f50ad46..afd5cb5cb9 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2021 Brendan Tildesley ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Bonface Munyoki Kilyungi +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -905,6 +906,42 @@ for the @code{pytest} framework.") rounds that are calibrated to the chosen timer.") (license license:bsd-2))) +(define-public python-date2name + (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798") + (revision "1")) + (package + (name "python-date2name") + (version (git-version "" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/novoid/date2name") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bindir (string-append (assoc-ref outputs "out") "/bin")) + (binary (string-append bindir "/date2name"))) + (mkdir-p bindir) + (copy-file "date2name/__init__.py" binary) + (chmod binary #o555))))))) + (synopsis "Handling time-stamps and date-stamps in file names") + (description "By default, date2name gets the modification time of matching +files and directories and adds a datestamp in standard ISO 8601+ format +YYYY-MM-DD at the beginning of the file or directory name.") + (home-page "https://github.com/novoid/date2name") + (license license:gpl3+)))) + (define-public python-pytest-xvfb (package (name "python-pytest-xvfb")