diff options
author | Marius Bakke <marius@gnu.org> | 2022-02-04 10:22:17 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-02-13 15:15:57 +0100 |
commit | 662d1229677b70428d4630c3b417ee2fce97ed67 (patch) | |
tree | b1335175ae2ec3789939b656c933dfc6154f819d /gnu/packages | |
parent | aad0b91c370e2159e2c23d34950cdd5b40ae1636 (diff) | |
download | guix-662d1229677b70428d4630c3b417ee2fce97ed67.tar.gz |
gnu: python-charset-normalizer: Trim closure size.
* gnu/packages/python-xyz.scm (python-charset-normalizer)[arguments]: Override wrap phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/python-xyz.scm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 88edd7de3e..1b23f46f4c 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13124,6 +13124,26 @@ automatically detect a wide range of file encodings.") (sha256 (base32 "071pi2kd222rjjrjdllffqv3iz4bfaj93a9bfs65907fd6fqlfcq")))) (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + ;; This package provides a 'normalizer' executable that only + ;; depends on Python, so customize the wrap phase to avoid + ;; adding pytest and friends in order to save size. + ;; (See also <https://bugs.gnu.org/25235>.) + (replace 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((sitedir (site-packages inputs outputs)) + (python (dirname (dirname + (search-input-file + inputs "bin/python")))) + (python-sitedir + (string-append python "/lib/python" + (python-version python) + "/site-packages"))) + (wrap-program (string-append #$output "/bin/normalizer") + `("GUIX_PYTHONPATH" ":" suffix + ,(list sitedir python-sitedir))))))))) (native-inputs (list python-pytest)) (home-page "https://github.com/ousret/charset_normalizer") |