From 19349bf56a88feb5ebc0d24c4f3324e776b2f5ff Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 28 Feb 2021 13:05:51 +0100 Subject: [PATCH 04/14] gnu: python-setuptools: Bootstrap using itself * gnu/packages/python-xyz.scm (python-setuptools) [arguments]: Add phase setting GUIX_PYTHONPATH to source directory. --- gnu/packages/python-xyz.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index eebb44b9dc..8f472dea42 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1390,7 +1390,18 @@ other machines, such as over the network.") ;; FIXME: Tests require pytest, which itself relies on setuptools. ;; One could bootstrap with an internal untested setuptools. (arguments - `(#:tests? #f)) + `(#:tests? #f + #:python ,python-wrapper + #:phases (modify-phases %standard-phases + ;; Use this setuptools’ sources to bootstrap themselves. + (add-before 'build 'set-PYTHONPATH + (lambda _ + (format #t "current working dir ~s~%" (getcwd)) + (setenv "GUIX_PYTHONPATH" + (string-append ".:" (getenv "GUIX_PYTHONPATH"))) + #t))))) + ;; Not required when not building a wheel + ;(propagated-inputs `(("python-wheel" ,python-wheel))) (home-page "https://pypi.org/project/setuptools/") (synopsis "Library designed to facilitate packaging Python projects") -- 2.26.3