From 126dde2fb570526c474b8f1aa0d055c5195e784b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 4 Jul 2024 16:44:53 +0200 Subject: gnu: python-cloud-init: Move files. * gnu/packages/python-web.scm (python-cloud-init)[arguments]: Add phase 'move-files to move data files out of site-packages directory. Change-Id: I1322b990226174283d724539a98f7470221e9058 --- gnu/packages/python-web.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index ae63d58131c..01b85d1850c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -7455,11 +7455,19 @@ Encoding for HTTP.") " and not test_subp_combined_stderr_stdout" " and not test_handle_part")) #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'patch-references - (lambda _ - (substitute* "tests/unittests/cmd/test_clean.py" - (("#!/bin/sh") (string-append "#!" (which "sh"))))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-references + (lambda _ + (substitute* "tests/unittests/cmd/test_clean.py" + (("#!/bin/sh") (string-append "#!" (which "sh")))))) + (add-after 'install 'move-files + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each (lambda (dir) + (let ((source (string-append (site-packages inputs outputs) "/" dir)) + (target (string-append #$output "/" (basename dir)))) + (copy-recursively source target) + (delete-file-recursively source))) + (list "etc" "lib" "usr/lib" "usr/share"))))))) (propagated-inputs (list python-configobj python-jinja2 -- cgit v1.3