[bug#74581] gnu: Add pyre.

Message ID 87r067uxhh.fsf@gmail.com
State New
Headers
Series [bug#74581] gnu: Add pyre. |

Commit Message

Sharlatan Hellseher Dec. 16, 2024, 9:30 p.m. UTC
  Hi Maxim,

Did you try to import from PyPI? I've gave it a go and with some
adjustment it may be built with pyproject-build-system as a native python
library, WDYT?
--
Oleg
  

Comments

Maxim Cournoyer Dec. 18, 2024, 1:44 a.m. UTC | #1
Hi Sharlatan,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> Hi Maxim,
>
> Did you try to import from PyPI? I've gave it a go and with some
> adjustment it may be built with pyproject-build-system as a native python
> library, WDYT?

Yes, that's what I had tried first.  It results in this:

--8<---------------cut here---------------start------------->8---
phase `install' failed after 0.1 seconds
Backtrace:
          13 (primitive-load "/gnu/store/334plx7fz3sgknf9x56cn37h7v2…")
In guix/build/gnu-build-system.scm:
    966:2 12 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    634:9 10 (for-each #<procedure 7fffeef9e4e0 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
   987:23  8 (_)
In srfi/srfi-1.scm:
    634:9  7 (for-each #<procedure 7ffff790f510 at guix/build/pypro…> …)
In guix/build/pyproject-build-system.scm:
   234:10  6 (_ "/gnu/store/7sd87yqcnl2nws6qa0lww9n8acgnizab-python-…")
    200:6  5 (merge-directories "/gnu/store/7sd87yqcnl2nws6qa0lww9n…" …)
In srfi/srfi-1.scm:
    634:9  4 (for-each #<procedure 7ffff790f420 at guix/build/pypro…> …)
In guix/build/pyproject-build-system.scm:
   204:18  3 (_ "lib")
In unknown file:
           2 (rename-file "/gnu/store/7sd87yqcnl2nws6qa0lww9n8acgni…" …)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure rename-file: Directory not empty
build process 18 exited with status 256
builder for `/gnu/store/kxp5q1zbb4acyfz4v6igcddwl87y4av7-python-pyre-1.12.5.drv' failed with exit code 1
build of /gnu/store/kxp5q1zbb4acyfz4v6igcddwl87y4av7-python-pyre-1.12.5.drv failed
View build log at '/var/log/guix/drvs/kx/p5q1zbb4acyfz4v6igcddwl87y4av7-python-pyre-1.12.5.drv'.
guix build: error: build of `/gnu/store/kxp5q1zbb4acyfz4v6igcddwl87y4av7-python-pyre-1.12.5.drv' failed
--8<---------------cut here---------------end--------------->8---

And while that's fixable (see a patch I've sent in #74582), then it'd
fail the validate-runpath phase.  Building from CMake directly appears
to me cleaner than going through the extra abstraction that is scikit,
and doesn't suffer from the previous problems (see the various issues
reported at https://github.com/pyre/pyre/issues by Amtrak's -- that's
me).

I hope that answers the question :-).
  
Maxim Cournoyer Dec. 19, 2024, 5:46 a.m. UTC | #2
Hi,

I've now applied this.
  

Patch

From 95b59ea9f569bad1bdb17d0b1cbb79c69e3cc4df Mon Sep 17 00:00:00 2001
Message-ID: <95b59ea9f569bad1bdb17d0b1cbb79c69e3cc4df.1734384298.git.sharlatanus@gmail.com>
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 16 Dec 2024 21:24:28 +0000
Subject: [PATCH] gnu: Add python-pyre.

* gnu/packages/python-science.scm (python-pyre): New variable.

Change-Id: Iabdcfc2febd90cd002a86d7aec505be6de65d632
---
 gnu/packages/python-science.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 05c6ac1fc1..869b97e37e 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -223,6 +223,36 @@  (define-public python-osqp
 numerical optimization package.")
     (license license:asl2.0)))
 
+(define-public python-pyre
+  (package
+    (name "python-pyre")
+    (version "1.12.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyre" version))
+       (sha256
+        (base32 "1mlk4blh1q47jvwz9glkvnhg7hs5ax27s2jakcjsir8gbsvy1qcv"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     (list pybind11
+           python-numpy
+           python-scikit-build
+           python-setuptools
+           python-setuptools-scm
+           python-wheel))
+    (propagated-inputs
+     (list python-pyyaml))
+    (home-page "http://pyre.orthologue.com/")
+    (synopsis "Framework for building scientific applications")
+    (description
+     "This package provides a framework for building scientific applications.
+It aims to bring state of the art software design practices to scientific
+computing, with the goal of providing a strong skeleton on which to build
+scientific codes by steering the implementation towards usability and
+maintainability.")
+    (license license:bsd-3)))
+
 (define-public python-qdldl
   (package
     (name "python-qdldl")

base-commit: a3ffb920f14cd0d31d1e7067e11dc523fe380996
-- 
2.46.0