Subject: [PATCH] gnu: python-twisted: Remove test artifacts

From: Jakob Kirsch <[email-masked]>
Date: Mon, 14 Apr 2025 21:20:58 +0200

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: <60b8[email-masked]>
From: Jakob Kirsch <[email-masked]>
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(-)

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

base-commit: 617f4766791d8818c12a0dbc46af429ee070879e
-- 
2.49.0