[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/19: gnu: libftdi: Build Python bindings.
From: |
guix-commits |
Subject: |
16/19: gnu: libftdi: Build Python bindings. |
Date: |
Thu, 14 Sep 2023 17:45:22 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 856eeedcbc65add655a40878ebed81aecd44a377
Author: Simon South <simon@simonsouth.net>
AuthorDate: Thu Sep 7 12:37:56 2023 -0400
gnu: libftdi: Build Python bindings.
* gnu/packages/libftdi.scm (libftdi)[outputs]: Add "python".
[arguments]<#:phases>: Add with "install-python-binding" phase.
[native-inputs]: Add python, swig.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/libftdi.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 0a996b05e7..773b0ec73e 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2023 Simon South <simon@simonsouth.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,15 +19,19 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libftdi)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages textutils))
(define-public libftdi
@@ -42,6 +47,7 @@
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
+ (outputs '("out" "python"))
(arguments
(list
#:configure-flags
@@ -49,10 +55,26 @@
#$output "/share/doc/" #$name "-" #$version)
"-DEXAMPLES=OFF"
"-DLIB_SUFFIX=''") ; place libraries in /lib, not /lib64
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-python-binding
+ (lambda _
+ (let* ((python-version
+ #$(version-major+minor (package-version python)))
+ (python-lib-path
+ (string-append "/lib/python" python-version)))
+ (mkdir-p (string-append #$output:python "/lib"))
+ (mkdir-p (string-append #$output:python "/share/libftdi"))
+ (rename-file (string-append #$output python-lib-path)
+ (string-append #$output:python python-lib-path))
+ (rename-file (string-append #$output
+ "/share/libftdi/examples")
+ (string-append #$output:python
+ "/share/libftdi/examples"))))))
#:test-target "check"
#:tests? #f)) ; tests fail without access to USB
(native-inputs
- (list pkg-config))
+ (list pkg-config python swig))
(inputs
(list boost libconfuse))
(propagated-inputs
- branch master updated (6d12c16299 -> 1149cc1b9f), guix-commits, 2023/09/14
- 05/19: gnu: dpf-plugins: Update to 1.7., guix-commits, 2023/09/14
- 14/19: gnu: libftdi: Build ftdi_eeprom., guix-commits, 2023/09/14
- 09/19: gnu: icewm: Update to 3.4.1, guix-commits, 2023/09/14
- 12/19: gnu: libftdi: Do not build example programs., guix-commits, 2023/09/14
- 16/19: gnu: libftdi: Build Python bindings.,
guix-commits <=
- 02/19: gnu: makefile2graph: fix cross-compile., guix-commits, 2023/09/14
- 03/19: gnu: uncrustify: Update to 0.77.1., guix-commits, 2023/09/14
- 01/19: gnu: openmpi: Enable PMIx., guix-commits, 2023/09/14
- 04/19: gnu: uncrustify: use new style and gexp., guix-commits, 2023/09/14
- 08/19: gnu: armagetronad: Update to 0.2.9.1.1., guix-commits, 2023/09/14
- 07/19: gnu: kwin: Unwrap executable name for desktop file search., guix-commits, 2023/09/14
- 10/19: gnu: libftdi: Update package style., guix-commits, 2023/09/14
- 19/19: gnu: go-ipfs: Update to 0.13.0., guix-commits, 2023/09/14
- 06/19: gnu: nanosvg: Add a patch for PrusaSlicer 2.6., guix-commits, 2023/09/14
- 15/19: gnu: libftdi: Build C++ bindings., guix-commits, 2023/09/14