From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SNfEGxk7lWSTKAEASxT56A (envelope-from ) for ; Fri, 23 Jun 2023 08:26:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SOAHGxk7lWRnbQEAG6o9tA (envelope-from ) for ; Fri, 23 Jun 2023 08:26:33 +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 DE645BA7F for ; Fri, 23 Jun 2023 08:26:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCaFN-0003Bl-Bs; Fri, 23 Jun 2023 02:26:17 -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 1qCaFB-00038o-Tw for guix-patches@gnu.org; Fri, 23 Jun 2023 02:26:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCaFB-0002ON-La for guix-patches@gnu.org; Fri, 23 Jun 2023 02:26:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCaF9-0000bS-5V; Fri, 23 Jun 2023 02:26:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63765] [PATCH v3 8/8] gnu: python-lief: Update to 0.13.2. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Fri, 23 Jun 2023 06:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63765 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63765@debbugs.gnu.org Cc: Hilton Chain , Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 63765-submit@debbugs.gnu.org id=B63765.16875015142230 (code B ref 63765); Fri, 23 Jun 2023 06:26:03 +0000 Received: (at 63765) by debbugs.gnu.org; 23 Jun 2023 06:25:14 +0000 Received: from localhost ([127.0.0.1]:37325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCaEL-0000Zo-Ei for submit@debbugs.gnu.org; Fri, 23 Jun 2023 02:25:13 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:60138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCaEF-0000ZQ-94 for 63765@debbugs.gnu.org; Fri, 23 Jun 2023 02:25:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1687501315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8PY1wna++oA4YARQk474ZMcRyR1WvDeVltZlgGNkQe0=; b=eMKzHsN+DP4RukpIUK5jf1kZaI0r9TtrJqidkRJE6FuUASvEM8iochrWeAp4ZyIwI8U2z2 fg6D336wvItuOXaRx1GZcSvJHkp055wKLkRJUvANXsuWolPyzFCNf2UEsqKF2Pj+jRzAr5 pLw2PCs4xy1XaBpzIMcuAOVKx9rfLgX0XpxkEg36vpOV4E9b2zs2Do2MRIflHxd60pBt1G yGuyz27HUj7hDxH10tjBCsUAUj8Dp4EhlUjtUn6ybv1YTmvHiOHyGeAlrVVEJl71NdI1fL BRScByN/Nu8SBOxfKPqaOe78lLFdJgUjm2JnMLPrEn7jC+EyjXO/NwGn2VYdMg== Date: Fri, 23 Jun 2023 14:24:49 +0800 Message-Id: <74a181c4bb48d32681bea5046c9b145a76b3c9a8.1687500984.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- 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: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687501593; a=rsa-sha256; cv=none; b=tZZZErVTJVh/9tSLL2980o+TQGqth0HH6Hfsg4aXPmPEhRdU7Vg6tgKa7kbk0ziB9A1skz 6PGjFJUMOw6fyahZY0ggNqHjSbEk2UEKExWXoWWF4wqKLhxBtytikJXdOKdFnydV+qU9Y5 2WarHakfVXDM5xLILesUubPxB2oaRfZMXT2rWlahhtNtKAfcr8Bt7hBB21x/Ioo/B0251k JmSMzcB8e3xiob5OZSoOKmPp69x8lDGDZtAehwISOYnjVYqfXp/exINex2n/Kv1MnlPhlK h9jj2LPnKr/k7jTricNI+WtdbIb+GoSL9Rm3B3EM0umVWyuH7bGATB9T3opBjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=eMKzHsN+; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687501593; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=8PY1wna++oA4YARQk474ZMcRyR1WvDeVltZlgGNkQe0=; b=swx7dReXYZylmkGVWhV8nFkiiBLhrweWD72ajP/v6X2djs1AegDPue9Duuk34YnwPBzZhc X/wZE/Pc1m+kcfDuTL9acVBGdAIoARuL2/5JHq0mfHZNrMmFnUpJL5BFxC+7Ep/hXX4pVu My4r/6VbpWJu1A7Ez1xMOzBOPXxhfZCiXFyk0mG2Pm3xCNEkHIyOuQejXqMLJYcaOkbK6O bk3yzEMngRzA3C9fa2f1fz0NsVGjSE7g6c54P1RVOtAm5+BEhxz8unGOU8aJGWCDVBtwVJ ygmmo9wJkOq2cjyuEL2t+Ul66WinA3BuIOvadoFDPXGqK+DFC16Z/CRVFkENqw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=eMKzHsN+; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.75 X-Spam-Score: -1.75 X-Migadu-Queue-Id: DE645BA7F X-TUID: FUqDTNwp1aUR * gnu/packages/python-xyz.scm (python-lief): Update to 0.13.2. [snippet]: Unbundle third-party dependencies. [build-system]: Change to cmake-build-system [native-inputs]: Add python-minimal-wrapper, python-tomli. Remove cmake. [inputs]: Add frozen, mbedtls-apache, nlohmann-json, pybind11, utfcpp, spdlog. [outputs]: Add "python" output. [home-page]: Update homepage. (shrinkwrap)[inputs]: Replace python-lief to its "python" output. --- gnu/packages/python-xyz.scm | 96 +++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 15 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b650b71f3b..622867a499 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -212,6 +212,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + #:use-module (gnu packages logging) #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages markup) @@ -33141,29 +33142,94 @@ (define-public python-misskey (define-public python-lief (package (name "python-lief") - (version "0.12.3") + (version "0.13.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lief-project/LIEF") (commit version))) (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + '(begin + ;; Configure build for Python bindings. + (substitute* "api/python/config-default.toml" + (("(ninja = )true" all m) + (string-append m "false")) + (("(parallel-jobs = )0" all m) + (string-append m (number->string (parallel-job-count))))) + ;; Unbundle third-party dependencies. + (for-each delete-file + (find-files "third-party/" + (string-join '("spdlog" + "frozen" + "json" + "mbedtls" + "pybind11" + "utfcpp") + "|" ))) + ;; Same in argument #:configure-flags. + (substitute* "api/python/setup.py" + (("self\\._get_third_party_opt\\(\\)") + "[\"-DLIEF_EXTERNAL_SPDLOG=ON\", + \"-DLIEF_OPT_FROZEN_EXTERNAL=ON\", + \"-DLIEF_OPT_MBEDTLS_EXTERNAL=ON\", + \"-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON\", + \"-DLIEF_OPT_PYBIND11_EXTERNAL=ON\", + \"-DLIEF_OPT_UTFCPP_EXTERNAL=ON\"]")))) (sha256 (base32 - "11i6hqmcjh56y554kqhl61698n9v66j2qk1c1g63mv2w07h2z661")))) - (build-system python-build-system) - (native-inputs (list cmake)) + "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) + (build-system cmake-build-system) (arguments - (list - #:tests? #f ;needs network - #:phases #~(modify-phases %standard-phases - (replace 'build - (lambda _ - (invoke - "python" "setup.py" "--sdk" "build" - (string-append - "-j" (number->string (parallel-job-count))))))))) - (home-page "https://github.com/lief-project/LIEF") + (list #:modules + '((guix build utils) + (guix build cmake-build-system) + ((guix build python-build-system) #:prefix python:)) + #:imported-modules + (append %cmake-build-system-modules + '((guix build python-build-system))) + #:configure-flags + #~'("-DCMAKE_LINK_WHAT_YOU_USE=ON" + "-DBUILD_SHARED_LIBS=ON" + "-DLIEF_INSTALL_COMPILED_EXAMPLES=ON" + "-DLIEF_TESTS=ON" + ;; Unbundle third-party dependencies + "-DLIEF_EXTERNAL_SPDLOG=ON" + "-DLIEF_OPT_FROZEN_EXTERNAL=ON" + "-DLIEF_OPT_MBEDTLS_EXTERNAL=ON" + "-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON" + "-DLIEF_OPT_PYBIND11_EXTERNAL=ON" + "-DLIEF_OPT_UTFCPP_EXTERNAL=ON") + #:phases + ;; Phases from python-build-system, for Python bindings. + #~(modify-phases %standard-phases + (add-after 'install 'chdir + (lambda _ + (chdir "../source/api/python/"))) + (add-after 'chdir 'ensure-no-mtimes-pre-1980 + (assoc-ref python:%standard-phases 'ensure-no-mtimes-pre-1980)) + (add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism + (assoc-ref python:%standard-phases 'enable-bytecode-determinism)) + (add-after 'enable-bytecode-determinism 'ensure-no-cythonized-files + (assoc-ref python:%standard-phases 'ensure-no-cythonized-files)) + (add-after 'ensure-no-cythonized-files 'python-install + (lambda* (#:key inputs outputs #:allow-other-keys) + ((assoc-ref python:%standard-phases 'install) + #:inputs inputs + #:outputs outputs + #:configure-flags '() + #:use-setuptools? #t))) + (add-after 'python-install 'add-install-to-pythonpath + (assoc-ref python:%standard-phases 'add-install-to-pythonpath)) + (add-after 'add-install-to-pythonpath 'add-install-to-path + (assoc-ref python:%standard-phases 'add-install-to-path)) + (add-after 'add-install-to-path 'python-wrap + (assoc-ref python:%standard-phases 'wrap))))) + (native-inputs (list python-minimal-wrapper python-tomli)) + (inputs (list frozen mbedtls-apache nlohmann-json pybind11 utfcpp spdlog)) + (outputs '("out" "python")) + (home-page "https://lief-project.github.io/") (synopsis "Library to instrument executable formats") (description "@code{python-lief} is a cross platform library which can parse, modify @@ -33211,7 +33277,7 @@ (define-public shrinkwrap python-poetry-core python-pypa-build python-pytest)) - (inputs (list python-lief python-sh)) + (inputs (list `(,python-lief "python") python-sh)) (home-page "https://github.com/fzakaria/shrinkwrap") (synopsis "Emboss needed dependencies on the top level executable") (description -- 2.40.1