summary refs log tree commit diff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-02-11 15:50:34 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-02-19 08:16:47 +0100
commit8285093cee000d6e28c040f721ddf0be18d32c42 (patch)
treefb869f958b1de67b0eb18d4eed1fe056398cb341
parentb5326763c7f629980a80a210d2cd57e9ca21b29b (diff)
downloadguix-8285093cee000d6e28c040f721ddf0be18d32c42.tar.gz
gnu: python-clingo: Install distribution information.
* gnu/packages/maths.scm (python-clingo)[#:phases]: Add ‘install-distinfo’.
-rw-r--r--gnu/packages/maths.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ceb2f14a80..fc85560114 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2717,7 +2717,17 @@ satisfiability checking (SAT).")
                   (("ctl\\.solve\\(on_statistics=on_statistics\\)" all)
                    (string-append
                     all
-                    "; self.skipTest(\"You shall not fail.\")")))))))))
+                    "; self.skipTest(\"You shall not fail.\")")))))
+            (add-after 'install 'install-distinfo
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (with-directory-excursion (python:site-packages inputs outputs)
+                   (let ((dir (string-append "clingo-" #$version ".dist-info")))
+                     (mkdir-p dir)
+                     (call-with-output-file (string-append dir "/METADATA")
+                       (lambda (port)
+                         (format port "Metadata-Version: 1.1~%")
+                         (format port "Name: clingo~%")
+                         (format port "Version: ~a~%" #$version)))))))))))
     (inputs (list clingo python-wrapper))
     (propagated-inputs (list python-cffi))
     (native-inputs (modify-inputs (package-native-inputs clingo)