From 36c1d6f320cc744f63a6d80d5265dcd0683284c8 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Thu, 20 Jan 2022 15:47:30 +0100 Subject: [PATCH] gnu: Add python-edflib. * gnu/packages/python-science.scm (python-edflib): New variable. --- gnu/packages/python-science.scm | 51 ++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 1cfc8e5869..b6dcc553fb 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -61,7 +61,8 @@ (define-module (gnu packages python-science) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix gexp)) (define-public python-scipy (package @@ -1035,3 +1036,51 @@ (define-public python-modin libraries, Modin provides seamless integration and compatibility with existing pandas code.") (license license:asl2.0))) + +(define-public python-edflib + (package + (name "python-edflib") + (version "1.0.6") + (source (origin + (method url-fetch) + (uri (pypi-uri "EDFlib-Python" version)) + (sha256 + (base32 + "1g069kyibskx5q2mc494xgjhvdspw5lvk2xhn0kqcgq1h37x5lfv")))) + (build-system python-build-system) + (arguments + (list #:tests? #f ;requires Python's test module, not available in Guix + #:phases + #~(modify-phases %standard-phases + ;; XXX: PEP 517 manual build copied from python-isort. + (replace 'build + (lambda _ + (setenv "SOURCE_DATE_EPOCH" "315532800") + (invoke "python" + "-m" + "build" + "--wheel" + "--no-isolation" + "."))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" + "--no-cache-dir" + "--no-input" + "install" + "--no-deps" + "--prefix" + #$output + whl))))))) + (propagated-inputs (list python-numpy python-pypa-build)) + (home-page "https://www.teuniz.net/edflib_python/") + (synopsis "Read and write EDF+/BDF+ files") + (description + "EDFlib for Python is a programming library to read and write EDF+ and +BDF+ files. It also reads old-type EDF/BDF files. @dfn{EDF} means +@url{https://www.teuniz.net/edfbrowser/edf%20format%20description.html, +European Data Format}. @dfn{BDF} is the +@url{https://www.teuniz.net/edfbrowser/bdfplus%20format%20description.html, +24-bit version} of EDF.") + (license license:bsd-3))) -- 2.34.0