[bug#77808] gnu: python-twisted: Remove test artifacts

Message ID Z_1gGtBa6Qr6mqak@kernelpanicroom
State New
Headers
Series [bug#77808] gnu: python-twisted: Remove test artifacts |

Commit Message

Jakob Kirsch April 14, 2025, 7:20 p.m. UTC
  python-twisted seems to leave _trial_temp in the output directory after the tests so this patch takes care of that.
Should be applied onto the python-team branch.
From 60b8bc7828b1900ca25a862e1ee241b9082951f6 Mon Sep 17 00:00:00 2001
Message-ID: <60b8bc7828b1900ca25a862e1ee241b9082951f6.1744658389.git.jakob.kirsch@web.de>
From: Jakob Kirsch <jakob.kirsch@web.de>
Date: Mon, 14 Apr 2025 21:18:24 +0200
Subject: [PATCH] gnu: python-twisted: Remove test artifacts

* gnu/packages/python-xyz.scm (python-twisted): [arguments]: <phases>: Extend check phase to clean up test artifacts.

Change-Id: Ibbf04771dea4342fe66221a740a11ad9882b6038
---
 gnu/packages/python-xyz.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: 617f4766791d8818c12a0dbc46af429ee070879e
  

Comments

Christopher Baines April 27, 2025, 12:51 p.m. UTC | #1
Jakob Kirsch via Guix-patches via <guix-patches@gnu.org> writes:

> python-twisted seems to leave _trial_temp in the output directory
> after the tests so this patch takes care of that.  Should be applied
> onto the python-team branch.
>
> [2. text/plain; 0001-gnu-python-twisted-Remove-test-artifacts.patch]...

Thanks for the patch, QA has applied this to master and built the
dependents so I've gone ahead and pushed this to master as
06ec680418a722247af4f78f06da34a70af06462.

Chris
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 01aaff8949..8937a7eed5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22838,7 +22838,8 @@  (define-public python-twisted
               (when tests?
                 (with-directory-excursion #$output
                   (setenv "HOME" (getcwd))
-                  (invoke "python3" "-m" "twisted.trial" "twisted"))))))))
+                  (invoke "python3" "-m" "twisted.trial" "twisted")
+                  (delete-file-recursively "_trial_temp"))))))))
     (propagated-inputs
      (list python-attrs
            python-automat