guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: clang-python-bindings: Embed version string.


From: guix-commits
Subject: branch master updated: gnu: clang-python-bindings: Embed version string.
Date: Tue, 24 Oct 2023 04:48:08 -0400

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 7383d15641 gnu: clang-python-bindings: Embed version string.
7383d15641 is described below

commit 7383d15641f17af5a8c656a4ad592138abc7d5ec
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Oct 24 10:43:15 2023 +0200

    gnu: clang-python-bindings: Embed version string.
    
    * gnu/packages/llvm.scm (clang-python-bindings)[arguments]: Embed the 
version
    string in the generated setup.py.
    
    Change-Id: If8764a483dd1a3786d4b3cab1f21846a18f3b07d
---
 gnu/packages/llvm.scm | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index cd551f4e02..5d779b87cc 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès 
<ludo@gnu.org>
 ;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com>
-;;; Copyright © 2016, 2018, 2019, 2020, 2021 Ricardo Wurmus 
<rekado@elephly.net>
+;;; Copyright © 2016, 2018, 2019, 2020, 2021, 2023 Ricardo Wurmus 
<rekado@elephly.net>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2018–2022 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -1970,25 +1970,27 @@ requirements according to version 1.1 of the OpenCL 
specification.")
     (build-system python-build-system)
     (outputs '("out"))
     (arguments
-     '(#:phases (modify-phases %standard-phases
-                  (add-before 'build 'change-directory
-                    (lambda _
-                      (chdir "bindings/python")))
-                  (add-before 'build 'create-setup-py
-                    (lambda _
-                      ;; Generate a basic "setup.py", enough so it can be
-                      ;; built and installed.
-                      (with-output-to-file "setup.py"
-                        (lambda ()
-                          (display "from setuptools import setup
-setup(name=\"clang\", packages=[\"clang\"])\n")))))
-                  (add-before 'build 'set-libclang-file-name
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      ;; Record the absolute file name of libclang.so.
-                      (let ((libclang (search-input-file inputs
-                                                         "/lib/libclang.so")))
-                        (substitute* "clang/cindex.py"
-                          (("libclang\\.so") libclang))))))))
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'build 'change-directory
+                     (lambda _
+                       (chdir "bindings/python")))
+                   (add-before 'build 'create-setup-py
+                     (lambda _
+                       ;; Generate a basic "setup.py", enough so it can be
+                       ;; built and installed.
+                       (with-output-to-file "setup.py"
+                         (lambda ()
+                           (format #true "from setuptools import setup
+setup(name=\"clang\", version=\"~a\", packages=[\"clang\"])\n"
+                                   #$(package-version this-package))))))
+                   (add-before 'build 'set-libclang-file-name
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Record the absolute file name of libclang.so.
+                       (let ((libclang (search-input-file inputs
+                                                          "/lib/libclang.so")))
+                         (substitute* "clang/cindex.py"
+                           (("libclang\\.so") libclang))))))))
     (inputs (list clang))
     (synopsis "Python bindings to libclang")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]