lbraun pushed a commit to branch wip-python-pep517
in repository guix.
commit 4ce85c28579bb883d85a990d5ca8f386a48a04aa
Author: Lars-Dominik Braun <[email protected]>
AuthorDate: Sun Nov 28 09:34:18 2021 +0100
gnu: dblatex: Use custom 'build and 'install phases.
* gnu/packages/docbook.scm (dblatex)[arguments]: Add custom 'build and
'install phases, remove obsolute #:use-setuptools?.
---
gnu/packages/docbook.scm | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6575bf2d75..94c2951b04 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -495,18 +495,16 @@ the in DocBook SGML DTDs.")
("docbook" ,docbook-xml)
("libxslt" ,libxslt))) ;for xsltproc
(arguments
- `(;; Using setuptools causes an invalid "package_base" path in
- ;; out/bin/.dblatex-real due to a missing leading '/'. This is caused
- ;; by dblatex's setup.py stripping the root path when creating the
- ;; script. (dblatex's setup.py still uses distutils and thus has to
- ;; create the script by itself. The feature for creating scripts is one
- ;; of setuptools' features.)
- ;; See this thread for details:
- ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html
- #:use-setuptools? #f
- #:tests? #f ;no 'test' command
+ `(#:tests? #f ;no 'test' command
#:phases
(modify-phases %standard-phases
+ ;; The setup.py defines multiple custom commands incompatible with
wheel generation.
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "python" "setup.py" "build")))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "python" "setup.py" "install" (string-append "--prefix="
(assoc-ref outputs "out")))))
(add-after 'wrap 'set-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))