[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/13: gnu: Add python-file.
From: |
Ludovic Courtès |
Subject: |
02/13: gnu: Add python-file. |
Date: |
Mon, 26 Oct 2015 23:02:25 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 5e1c936712d824e7ccbb3cbb8ac7ffa375237469
Author: Ludovic Courtès <address@hidden>
Date: Mon Oct 26 09:58:55 2015 +0100
gnu: Add python-file.
* gnu/packages/python.scm (python-file, python2-file): New variables.
---
gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9721343..23150a3 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -39,6 +39,7 @@
#:use-module (gnu packages backup)
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
+ #:use-module (gnu packages file)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gdbm)
#:use-module (gnu packages gcc)
@@ -5750,3 +5751,29 @@ Python's @code{ctypes} foreign function interface
(FFI).")
(define-public python2-libarchive-c
(package-with-python2 python-libarchive-c))
+
+(define-public python-file
+ (package
+ (inherit file)
+ (name "python-file")
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f ;no tests
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'change-directory
+ (lambda _
+ (chdir "python")
+ #t))
+ (add-before 'build 'set-library-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((file (assoc-ref inputs "file")))
+ (substitute* "magic.py"
+ (("find_library\\('magic'\\)")
+ (string-append "'" file "/lib/libmagic.so'")))
+ #t))))))
+ (inputs `(("file" ,file)))
+ (self-native-input? #f)
+ (synopsis "Python bindings to the libmagic file type guesser")))
+
+(define-public python2-file
+ (package-with-python2 python-file))
- branch master updated (64a7192 -> 7e9b07b), Ludovic Courtès, 2015/10/26
- 02/13: gnu: Add python-file.,
Ludovic Courtès <=
- 01/13: gnu: Add RPM., Ludovic Courtès, 2015/10/26
- 03/13: doc: Add a REPL example., Ludovic Courtès, 2015/10/26
- 06/13: utils: Add 'readlink*'., Ludovic Courtès, 2015/10/26
- 05/13: guix system: Extract action processing., Ludovic Courtès, 2015/10/26
- 04/13: ui: Add 'matching-generations'., Ludovic Courtès, 2015/10/26
- 07/13: ui: Add procedures to display a profile generation., Ludovic Courtès, 2015/10/26
- 08/13: guix system: Factorize boot parameter parsing., Ludovic Courtès, 2015/10/26
- 10/13: utils: Add 'switch-symlinks', moved from (guix ui)., Ludovic Courtès, 2015/10/26
- 09/13: guix system: Add the 'list-generations' command., Ludovic Courtès, 2015/10/26
- 11/13: profiles: Add generation manipulation procedures., Ludovic Courtès, 2015/10/26