From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GDK1Ctj8+WQ7RAEA9RJhRA:P1 (envelope-from ) for ; Thu, 07 Sep 2023 18:39:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GDK1Ctj8+WQ7RAEA9RJhRA (envelope-from ) for ; Thu, 07 Sep 2023 18:39:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7181391FF for ; Thu, 7 Sep 2023 18:39:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694104791; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Zu6UrWxvAqbLQHgZmpkXC954pkyjJRrelM94h8szhZQ=; b=MryTL1s9Pc/SPF2cvA047841JF+CWu2UvFJQAnsEpHZTq94CmkpkwuT11yiCJI4supkQQ0 AOuuiFotvMMlKBGxQnnZhksR6/3NV3EBe/ADBqsuEx28hDvbOADL2DrUHGVc39jbFFrSoe m02esE37OarZxyOB64pPxvGK6g08bPf4Zqxx5KMtlnwKUbUlULqB0NOiKkaHlEmOObhLnq mf1XkkD3Uus8rTt8u8DTlQeMAoudUayHINrbSdXPpOh0s2stf2iowHH7TiWIV3VXl4SAcd CRHD5RFaQJe31GrPG3Mcn7vdEMM7lYZ1fRAG3MruHf7G+HXigg75czxgOvzNWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694104791; a=rsa-sha256; cv=none; b=PGP9zMJhEh9AM9JVblEv6E9ua5Keg08xnl29JsRiZqPmcVPJQVQw+4BtAmY+AhkioRZRr7 K+QtM5/mpYrsUw0aYz9utE7WAGf2CdXygQFLvwMh7M/5kuHjQx6DnXREevJvu0/FAtRdn1 N24O0TM0uH0Yfn3ME+qaUhZyjRULgPSIxaDtM+wnr/R0wVw87spT9Bkc+Q5PbJI0TqGF8L 8ZStkJLeXMKW+sAVeJ1aH6ybs90e13hqffZwlw7rJ+TptRwWZgCAaNkLCHP/OREa6zlAEk oRZaWoOUZ6+kJRf3jWKaaNrN1B3qT8BHWG/expxjAO6SjGEIA8K7/+abE4D4zg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeI26-0007RS-0T; Thu, 07 Sep 2023 12:39:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeI22-0007Ou-DV for guix-patches@gnu.org; Thu, 07 Sep 2023 12:39:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeI22-0000GT-5i for guix-patches@gnu.org; Thu, 07 Sep 2023 12:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeI23-0003vy-Sf for guix-patches@gnu.org; Thu, 07 Sep 2023 12:39:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65807] [PATCH v2 7/9] gnu: libftdi: Build Python bindings. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Sep 2023 16:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65807 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65807@debbugs.gnu.org Received: via spool by 65807-submit@debbugs.gnu.org id=B65807.169410469815000 (code B ref 65807); Thu, 07 Sep 2023 16:39:03 +0000 Received: (at 65807) by debbugs.gnu.org; 7 Sep 2023 16:38:18 +0000 Received: from localhost ([127.0.0.1]:41225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeI1J-0003tq-Hx for submit@debbugs.gnu.org; Thu, 07 Sep 2023 12:38:17 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:48658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeI1F-0003sP-8y for 65807@debbugs.gnu.org; Thu, 07 Sep 2023 12:38:14 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 68E8863127 for <65807@debbugs.gnu.org>; Thu, 7 Sep 2023 16:38:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aOfoMPoh3QF2 for <65807@debbugs.gnu.org>; Thu, 7 Sep 2023 16:38:02 +0000 (UTC) Received: from laptop.smallsystems.net (23-233-96-210.cpe.pppoe.ca [23.233.96.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 0EC876312E for <65807@debbugs.gnu.org>; Thu, 7 Sep 2023 16:38:02 +0000 (UTC) From: Simon South Date: Thu, 7 Sep 2023 12:37:56 -0400 Message-Id: <4d91581c587d44c5c1c6feb63289adaa49dbb865.1694104141.git.simon@simonsouth.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: E7181391FF X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -5.43 X-Spam-Score: -5.43 X-TUID: L52bagCvKARo * gnu/packages/libftdi.scm (libftdi)[outputs]: Add "python". [arguments]<#:phases>: Add with "install-python-binding" phase. [native-inputs]: Add python, swig. --- 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 ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2023 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,15 +19,19 @@ ;;; along with GNU Guix. If not, see . (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 @@ (define-public libftdi (base32 "0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc")))) (build-system cmake-build-system) + (outputs '("out" "python")) (arguments (list #:configure-flags @@ -49,10 +55,26 @@ (define-public libftdi #$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 -- 2.40.1