[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/10: gnu: Add python-activepapers.
From: |
Ludovic Courtès |
Subject: |
06/10: gnu: Add python-activepapers. |
Date: |
Fri, 22 Dec 2017 04:04:12 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit de2032b912ede1756290e7ca9f7af7e9b72627eb
Author: Konrad Hinsen <address@hidden>
Date: Tue Dec 19 12:50:22 2017 +0100
gnu: Add python-activepapers.
* gnu/packages/python.scm (python-activepapers, python2-activepapers):
New variables.
Co-authored-by: Ludovic Courtès <address@hidden>
---
gnu/packages/python.scm | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1ef54b7..48e8d44 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -12001,3 +12001,73 @@ particularly convenient for use in tests.")
(define-public python2-tempdir
(package-with-python2 python-tempdir))
+(define-public python-activepapers
+ (package
+ (name "python-activepapers")
+ (version "0.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ActivePapers.Py" version))
+ (sha256
+ (base32
+ "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((ice-9 ftw)
+ (srfi srfi-1)
+ (guix build utils)
+ (guix build python-build-system))
+
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'delete-python2-code
+ (lambda _
+ (for-each delete-file
+ '("lib/activepapers/builtins2.py"
+ "lib/activepapers/standardlib2.py"
+ "lib/activepapers/utility2.py"))))
+ (replace 'check
+ (lambda _
+ ;; Deactivate the test cases that download files
+ (setenv "NO_NETWORK_ACCESS" "1")
+ ;; For some strange reason, some tests fail if nosetests runs all
+ ;; test modules in a single execution. They pass if each test
+ ;; module is run individually.
+ (for-each (lambda (filename)
+ (invoke "nosetests"
+ (string-append "tests/" filename)))
+ (scandir "tests"
+ (lambda (filename)
+ (string-suffix? ".py" filename)))))))))
+ (native-inputs
+ `(("python-tempdir" ,python-tempdir)
+ ("python-nose" ,python-nose)))
+ (propagated-inputs
+ `(("python-h5py" ,python-h5py)))
+ (home-page "http://www.activepapers.org/")
+ (synopsis "Executable papers for scientific computing")
+ (description
+ "ActivePapers is a tool for working with executable papers, which
+combine data, code, and documentation in single-file packages,
+suitable for publication as supplementary material or on repositories
+such as figshare or Zenodo.")
+ (properties `((python2-variant . ,(delay python2-activepapers))))
+ (license license:bsd-3)))
+
+(define-public python2-activepapers
+ (let ((base (package-with-python2
+ (strip-python2-variant python-activepapers))))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'delete-python2-code)
+ (add-after 'unpack 'delete-python3-code
+ (lambda _
+ (for-each delete-file
+ '("lib/activepapers/builtins3.py"
+ "lib/activepapers/standardlib3.py"
+ "lib/activepapers/utility3.py")))))))))))
- branch master updated (a468f89 -> d633f2f), Ludovic Courtès, 2017/12/22
- 03/10: services: urandom-seed: Become a dependency of 'user-processes'., Ludovic Courtès, 2017/12/22
- 06/10: gnu: Add python-activepapers.,
Ludovic Courtès <=
- 08/10: mapped-devices: 'luks-device-mapping' checks its source device., Ludovic Courtès, 2017/12/22
- 02/10: services: 'user-processes-service-type' can now be extended., Ludovic Courtès, 2017/12/22
- 04/10: services: urandom-seed: Deprecate the 'urandom-seed-service' procedure., Ludovic Courtès, 2017/12/22
- 10/10: gnu: mutter: Add xorg-xserver-xwayland input., Ludovic Courtès, 2017/12/22
- 07/10: mapped-devices: Add 'location' and 'check' fields., Ludovic Courtès, 2017/12/22
- 09/10: guix system: Check mapped devices upon 'init' and 'reconfigure'., Ludovic Courtès, 2017/12/22
- 01/10: doc: Document fixed-output derivations., Ludovic Courtès, 2017/12/22
- 05/10: services: urandom-seed: Depend on udev., Ludovic Courtès, 2017/12/22