From patchwork Sun Mar 17 17:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 61912 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 9DC4227BBEC; Sun, 17 Mar 2024 17:10:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8FF6C27BBEB for ; Sun, 17 Mar 2024 17:10:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlu1m-0000Rf-Sa; Sun, 17 Mar 2024 13:10:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlu1h-0000Ek-Rp for guix-patches@gnu.org; Sun, 17 Mar 2024 13:10:25 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlu1h-0001K6-C5 for guix-patches@gnu.org; Sun, 17 Mar 2024 13:10:25 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlu2I-0005hh-UY for guix-patches@gnu.org; Sun, 17 Mar 2024 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60238] [PATCH v3 3/7] gnu: beancount: Enable tests. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Mar 2024 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60238 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60238@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 60238-submit@debbugs.gnu.org id=B60238.171069541221805 (code B ref 60238); Sun, 17 Mar 2024 17:11:02 +0000 Received: (at 60238) by debbugs.gnu.org; 17 Mar 2024 17:10:12 +0000 Received: from localhost ([127.0.0.1]:58851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlu1T-0005fd-IE for submit@debbugs.gnu.org; Sun, 17 Mar 2024 13:10:11 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:48307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlu1M-0005dz-EL for 60238@debbugs.gnu.org; Sun, 17 Mar 2024 13:10:05 -0400 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-33ff53528ceso581304f8f.0 for <60238@debbugs.gnu.org>; Sun, 17 Mar 2024 10:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710695301; x=1711300101; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CrNVIiql1qzmJ71LRCtsAjJgQdylH1wYzBMsfIXVDYk=; b=UJS+cvvYYpRTvoabiebviVdrPOSLGyFmjqQYucQ3EPij9aOzUtI1QyfzALOci5i1gs DjkSpeV6lokXNc95uLaIwgy1sAYGLVmTh76FsUK3nakUIQNsekMqcZZO/idoqVt7h0/r pSL4pvh7hmDsN6gYvkWlsyt6sYboNiwkTWkwMm293b3j1fO/De2EwvgXRpfiBU9IUfPj ZpOKRII0+j7mLNSvG+9mPQ+X3eYrkD58MwI1kvtn/rrRUKXo2Shnrjut6tI6vPDWKqC6 KCsoKacq+JWbxJjVoe6DFxSSSY5MY5VAYeWXeriHru45poQT/JTa3Wq0/xzzgT6A1KyU 0R+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710695301; x=1711300101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CrNVIiql1qzmJ71LRCtsAjJgQdylH1wYzBMsfIXVDYk=; b=cgLJapRryxKTd1cDrqAlsQf7X2RGTUBTKuoi16qRMisrhsX9gw6kZF/kahDNYR5+eS EfvED8FSpxG59LwD6jCi6vL+EoWHTYaDO/OEo/jx7b43Wsi5ikAngqpd3A5YhcqE5CtA JKt+4V61JJezhP0Cg5gpJcY/K4tL8yaIO435L1bKZrKldRov37X6N5Ge8DESMi2FahM7 F7NLSdSbBmp9BZHipKhbRHA34ywlo8idS17vhbu3J4+UVOIdiOkJtMtmI3UKQtre4t2z diHiaJqd6mfxI7WZthasRfRAtoSUY4v849GIryTpuy6th2kRAm9g2PG1OAcH1Q3d2JMh L4gg== X-Gm-Message-State: AOJu0YzgSj3vFqEnKWNYadah5PFoxbYa/oFqbquGdnlFfP56Atl71ZiC ilxcJm+267HI7C1dryn/PsvWB/D/gkp8zMw2El7dAYJucRqMCA02kV5M7NTsPA4= X-Google-Smtp-Source: AGHT+IHopDT8Z9TAOfNDyKYiJ8Z5pJn2JhqFy988sbVe2jcf2uEkFjPd0LDgp0vo5/9KSdxfTs05BA== X-Received: by 2002:a5d:6b4b:0:b0:33e:b1e7:742a with SMTP id x11-20020a5d6b4b000000b0033eb1e7742amr6293232wrw.10.1710695301115; Sun, 17 Mar 2024 10:08:21 -0700 (PDT) Received: from localhost.localdomain (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id p10-20020a5d638a000000b0033e206a0a7asm7817968wru.26.2024.03.17.10.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 10:08:20 -0700 (PDT) From: Sharlatan Hellseher Date: Sun, 17 Mar 2024 17:08:10 +0000 Message-ID: <22f333c6950d102e1e0fa34dc6f25e4518a2d469.1710694980.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/finance.scm (beancount) [source]: Swap to git checkout, containing all required test data files. [build-system]: Swap to pyproject-build-system. [arguments] <#:phases>: Add 'build-extensions phase. [propagated-inputs]: python-auth2client. [native-inputs]: Add gnupg and python-pdfminer-six. Change-Id: Id0c725cae8cdc677ad0c3a0a75be6eea682eee05 --- gnu/packages/finance.scm | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index b9be19df74..c248f614ab 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -37,6 +37,7 @@ ;;; Copyright © 2023 Foundation Devices, Inc. ;;; Copyright © 2023 Attila Lendvai ;;; Copyright © 2024 Saku Laesvuori +;;; Copyright © 2024 Sharlatan Hellseher ;;; ;;; This file is part of GNU Guix. ;;; @@ -1969,22 +1970,40 @@ (define-public beancount (version "2.3.6") (source (origin - (method url-fetch) - (uri (pypi-uri "beancount" version)) + (method git-fetch) ; no test data files in PyPI archive + (uri (git-reference + (url "https://github.com/beancount/beancount") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0nj7sdh7wxc0hv8wxwqhw9v1zgx1sn4w92368ci2wzdmssz967w0")) - (patches (search-patches "beancount-disable-googleapis-fonts.patch")))) - (build-system python-build-system) + (base32 "1slxsjw29cyr2kbirdpijhpqspk55k38rpmk3zc02pr1wll62qsv")) + (patches (search-patches "beancount-disable-googleapis-fonts.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Remove broken experiments. + (delete-file-recursively "experiments") + ;; Remove bundled packages. + (delete-file-recursively "third_party"))))) + (build-system pyproject-build-system) (arguments (list - #:tests? #f ; Says test is missing, not sure why + #:test-flags + #~(list "-k" (string-append + ;; ModuleNotFoundError: No module named 'pytest' + "not test_parse_stdin" + ;; AssertionError: 5 not greater than 20 + " and not test_setup")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'relax-requirements (lambda _ (substitute* "setup.py" ;; Use compatible fork, and do not fail during sanity check. - (("\"pdfminer2\",") ""))))))) + (("\"pdfminer2\",") "")))) + (add-before 'check 'build-extensions + (lambda _ + (invoke "python" "setup.py" "build_ext" "--inplace")))))) (propagated-inputs (list python-beautifulsoup4 python-bottle @@ -1994,10 +2013,11 @@ (define-public beancount python-google-auth-oauthlib python-lxml python-magic + python-oauth2client python-ply python-requests)) (native-inputs - (list python-pytest)) + (list gnupg python-pdfminer-six python-pytest)) (home-page "https://beancount.github.io/") (synopsis "Command-line double-entry accounting tool") (description