GNU bug report logs - #57058
[PATCH] gnu: Add python-lief.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Mon, 8 Aug 2022 14:54:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57058 in the body.
You can then email your comments to 57058 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Mon, 08 Aug 2022 14:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 08 Aug 2022 14:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-lief.
Date: Mon, 08 Aug 2022 22:52:30 +0800
From 2d62c631996a97f98b4a1e7f383db87bb5b960a8 Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Mon, 8 Aug 2022 22:50:45 +0800
Subject: [PATCH] gnu: Add python-lief.

* gnu/packages/python-xyz.scm (python-lief): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b6ca32a757..300aa2b52a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30353,3 +30353,25 @@ (define-public i3-autotiling
      "Script for Sway and i3 to automatically switch the horizontal/vertical
  window split orientation.")
     (license license:gpl3)))
+
+(define-public python-lief
+  (package
+    (name "python-lief")
+    (version "0.12.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/lief-project/LIEF")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1"))))
+    (build-system python-build-system)
+    (native-inputs (list cmake))
+    (home-page "https://github.com/lief-project/LIEF")
+    (synopsis "Library to instrument executable formats")
+    (description
+     "LIEF is a cross platform library which can parse, modify and abstract ELF,
+PE and MachO formats.")
+    (license license:asl2.0)))

base-commit: ec6499aad231b8a5991f38c1ec982be4b3598837
-- 
2.37.1





Information forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Thu, 11 Aug 2022 15:38:01 GMT) Full text and rfc822 format available.

Message #8 received at 57058 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 57058 <at> debbugs.gnu.org
Subject: Re: bug#57058: [PATCH] gnu: Add python-lief.
Date: Thu, 11 Aug 2022 17:37:14 +0200
Hey,

> * gnu/packages/python-xyz.scm (python-lief): New variable.

This looks fine to me, but compilation takes a long time and appears to
be mono-threaded. I found that nix has the following snippet:

--8<---------------cut here---------------start------------->8---
    substituteInPlace setup.py \
      --replace 'cmake_args = []' "cmake_args = [ \"-DCMAKE_INSTALL_PREFIX=$prefix\" ]"
    ${pyEnv.interpreter} setup.py --sdk build --parallel=$NIX_BUILD_CORES
--8<---------------cut here---------------end--------------->8---

that can maybe allow parallel compilation?

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Tue, 16 Aug 2022 06:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 57058 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 57058 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>
Subject: [PATCH v2] gnu: Add python-lief.
Date: Tue, 16 Aug 2022 14:36:29 +0800
From b9ce692513271f33baf8e45cd10d0a350047986c Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Tue, 16 Aug 2022 14:31:05 +0800
Subject: [PATCH v2] gnu: Add python-lief.

* gnu/packages/python-xyz.scm (python-lief): New variable.
---

v1 -> v2: Enable parallel compilation.

Sorry for the latency! >_<

 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3259f46881..ecc1eab67c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30644,3 +30644,33 @@ (define-public python-misskey
      "This package provides access to Misskey's API.  Misskey is a SNS
 platform using the ActivityPub protocol.")
     (license license:expat)))
+
+(define-public python-lief
+  (package
+    (name "python-lief")
+    (version "0.12.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/lief-project/LIEF")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1"))))
+    (build-system python-build-system)
+    (native-inputs (list cmake))
+    (arguments
+     (list #: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")
+    (synopsis "Library to instrument executable formats")
+    (description
+     "LIEF is a cross platform library which can parse, modify and abstract ELF,
+PE and MachO formats.")
+    (license license:asl2.0)))

base-commit: ace7b5babe118adb9caf116eb8273f7db6e7f152
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Tue, 16 Aug 2022 09:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 57058 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 57058 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add python-lief.
Date: Tue, 16 Aug 2022 11:29:22 +0200
Hey,

> v1 -> v2: Enable parallel compilation.
>
> Sorry for the latency! >_<

No worries. I confirm that it compiles faster :)

It looks like no tests are run though:

--8<---------------cut here---------------start------------->8---
Copying /tmp/guix-build-python-lief-0.12.1.drv-0/source/build/lief.so into build/lib.linux-x86_64-3.9/lief.cpython-39-x86_64-linux-gnu.so
copying /tmp/guix-build-python-lief-0.12.1.drv-0/source/build/lief.so -> build/lib.linux-x86_64-3.9/lief.cpython-39-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.9/lief.cpython-39-x86_64-linux-gnu.so -> 

----------------------------------------------------------------------
Ran 0 tests in 0.000s
--8<---------------cut here---------------end--------------->8---

Any idea why?

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Tue, 16 Aug 2022 13:07:02 GMT) Full text and rfc822 format available.

Message #17 received at 57058 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 57058 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add python-lief.
Date: Tue, 16 Aug 2022 21:06:06 +0800
Found the option in the setup script, however the tests require network. There's
also options for docs, for now I'll try out if they are worthy enabling.




Information forwarded to guix-patches <at> gnu.org:
bug#57058; Package guix-patches. (Tue, 16 Aug 2022 13:32:01 GMT) Full text and rfc822 format available.

Message #20 received at 57058 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 57058 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>
Subject: [PATCH v3] gnu: Add python-lief.
Date: Tue, 16 Aug 2022 21:30:32 +0800
From c865b31b702d0e5f86faaadcb306cea269ae1109 Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Tue, 16 Aug 2022 21:26:33 +0800
Subject: [PATCH v3] gnu: Add python-lief.

* gnu/packages/python-xyz.scm (python-lief): New variable.
---

v2 -> v3: Disable tests.

 gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3259f46881..fbb52a300f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30644,3 +30644,34 @@ (define-public python-misskey
      "This package provides access to Misskey's API.  Misskey is a SNS
 platform using the ActivityPub protocol.")
     (license license:expat)))
+
+(define-public python-lief
+  (package
+    (name "python-lief")
+    (version "0.12.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/lief-project/LIEF")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1"))))
+    (build-system python-build-system)
+    (native-inputs (list cmake))
+    (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")
+    (synopsis "Library to instrument executable formats")
+    (description
+     "LIEF is a cross platform library which can parse, modify and abstract ELF,
+PE and MachO formats.")
+    (license license:asl2.0)))

base-commit: ace7b5babe118adb9caf116eb8273f7db6e7f152
-- 
2.37.2





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Wed, 17 Aug 2022 07:26:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Wed, 17 Aug 2022 07:26:02 GMT) Full text and rfc822 format available.

Message #25 received at 57058-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 57058-done <at> debbugs.gnu.org
Subject: Re: bug#57058: [PATCH] gnu: Add python-lief.
Date: Wed, 17 Aug 2022 09:25:04 +0200
> * gnu/packages/python-xyz.scm (python-lief): New variable.

Pushed, thanks!

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Sep 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.