diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-10-15 22:37:26 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-15 23:11:29 +0200 |
| commit | d96034ed697bcbac90b65304a08c90c5a0b08e33 (patch) | |
| tree | fd945c841fc3366357b08cfe73ad94500f98537f | |
| parent | d8c4998fd4449a82bcb2392f35da944c753640a8 (diff) | |
gnu: Add python-libarchive-c.
* gnu/packages/python.scm (python-libarchive-c, python2-libarchive-c):
New variables.
| -rw-r--r-- | gnu/packages/python.scm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2a240fa18c1..c972b625008 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) | 36 | #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) |
| 37 | #:use-module (gnu packages) | 37 | #:use-module (gnu packages) |
| 38 | #:use-module (gnu packages attr) | 38 | #:use-module (gnu packages attr) |
| 39 | #:use-module (gnu packages backup) | ||
| 39 | #:use-module (gnu packages compression) | 40 | #:use-module (gnu packages compression) |
| 40 | #:use-module (gnu packages databases) | 41 | #:use-module (gnu packages databases) |
| 41 | #:use-module (gnu packages fontutils) | 42 | #:use-module (gnu packages fontutils) |
| @@ -5666,3 +5667,49 @@ a hash value.") | |||
| 5666 | (inherit python-tlsh) | 5667 | (inherit python-tlsh) |
| 5667 | (name "python2-tlsh") | 5668 | (name "python2-tlsh") |
| 5668 | (inputs `(("python" ,python-2))))) | 5669 | (inputs `(("python" ,python-2))))) |
| 5670 | |||
| 5671 | (define-public python-libarchive-c | ||
| 5672 | (package | ||
| 5673 | (name "python-libarchive-c") | ||
| 5674 | (version "2.1") | ||
| 5675 | (source (origin | ||
| 5676 | (method url-fetch) | ||
| 5677 | (uri (string-append | ||
| 5678 | "https://pypi.python.org/packages/source/l/libarchive-c/libarchive-c-" | ||
| 5679 | version ".tar.gz")) | ||
| 5680 | (sha256 | ||
| 5681 | (base32 | ||
| 5682 | "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n")))) | ||
| 5683 | (build-system python-build-system) | ||
| 5684 | (arguments | ||
| 5685 | '(#:phases (modify-phases %standard-phases | ||
| 5686 | (add-before | ||
| 5687 | 'build 'reference-libarchive | ||
| 5688 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 5689 | ;; Retain the absolute file name of libarchive.so. | ||
| 5690 | (let ((libarchive (assoc-ref inputs "libarchive"))) | ||
| 5691 | (substitute* "libarchive/ffi.py" | ||
| 5692 | (("find_library\\('archive'\\)") | ||
| 5693 | (string-append "'" libarchive | ||
| 5694 | "/lib/libarchive.so'")))) | ||
| 5695 | |||
| 5696 | ;; Do not make a compressed egg (see | ||
| 5697 | ;; <http://bugs.gnu.org/20765>). | ||
| 5698 | (let ((port (open-file "setup.cfg" "a"))) | ||
| 5699 | (display "\n[easy_install]\nzip_ok = 0\n" | ||
| 5700 | port) | ||
| 5701 | (close-port port) | ||
| 5702 | #t)))))) | ||
| 5703 | (inputs | ||
| 5704 | `(("python-setuptools" ,python-setuptools) | ||
| 5705 | ("libarchive" ,libarchive))) | ||
| 5706 | (home-page "https://github.com/Changaco/python-libarchive-c") | ||
| 5707 | (synopsis "Python interface to libarchive") | ||
| 5708 | (description | ||
| 5709 | "This package provides Python bindings to libarchive, a C library to | ||
| 5710 | access possibly compressed archives in many different formats. It uses | ||
| 5711 | Python's @code{ctypes} foreign function interface (FFI).") | ||
| 5712 | (license lgpl2.0+))) | ||
| 5713 | |||
| 5714 | (define-public python2-libarchive-c | ||
| 5715 | (package-with-python2 python-libarchive-c)) | ||
