From 151f1720e3400e2b1463917f8e0917eef9904dca Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:19:27 +0200 Subject: gnu: python-sqlparse: Remove unnecessary runtime dependencies. * gnu/packages/databases.scm (python-sqlparse)[arguments]: Override 'wrap' phase. --- gnu/packages/databases.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index dd7f5102ad..2777293200 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016 Danny Milosavljevic -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2017, 2018 Julien Lepiller ;;; Copyright © 2017, 2020 Thomas Danckaert ;;; Copyright © 2017 Jelle Licht @@ -3520,7 +3520,22 @@ (define-public python-sqlparse `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ (invoke "py.test")))))) + (lambda _ + (invoke "py.test"))) + ;; XXX: The regular wrap phase ends up storing pytest as a runtime + ;; dependency. See . + (replace 'wrap + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref (or native-inputs inputs) "python")) + (sitedir (string-append "/lib/python" + (python-version python) + "/site-packages"))) + (wrap-program (string-append out "/bin/sqlformat") + `("PYTHONPATH" ":" prefix + ,(map (lambda (output) + (string-append output sitedir)) + (list python out)))))))))) (native-inputs `(("python-pytest" ,python-pytest))) (home-page "https://github.com/andialbrecht/sqlparse") -- cgit v1.2.3