[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/18: gnu: Add python-pyvips.
From: |
guix-commits |
Subject: |
09/18: gnu: Add python-pyvips. |
Date: |
Mon, 23 May 2022 10:26:08 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3a36e5409c8f6513fb8858f199065d28f227e80a
Author: Paul A. Patience <paul@apatience.com>
AuthorDate: Mon May 2 21:17:23 2022 +0000
gnu: Add python-pyvips.
* gnu/packages/python-xyz.scm (python-pyvips): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 95ed00da50..78954db2e3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -179,6 +179,7 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages image)
+ #:use-module (gnu packages image-processing)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages jupyter)
#:use-module (gnu packages kerberos)
@@ -7739,6 +7740,65 @@ write a wide range of image data, including animated
images, video, volumetric
data, and scientific formats.")
(license license:bsd-2)))
+(define-public python-pyvips
+ (package
+ (name "python-pyvips")
+ (version "2.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyvips" version))
+ (sha256
+ (base32 "0lq71iiic4pc8qhxr60gi141w25pjnn4vsh05d5l0fjkgjsv137b"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; Maybe switch to API mode (i.e., build the C extension)?
+ ;; It is advertised as faster to start up and run.
+ ;; However, even with ‘pkg-config’ and ‘python-pkgconfig’ in
+ ;; ‘native-inputs’, the API mode build fails with:
+ ;;
+ ;; Falling back to ABI mode. Details: unable to find
pkg-config package "vips"
+ ;;
+ ;; The build doesn't actually fail without the below
+ ;; substitution, it's just slower because ‘setup.py’ tries
+ ;; (unsuccessfully) to download the Python ‘pkgconfig’ module.
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (substitute* "setup.py"
+ (("^( +setup_)API\\(\\)\n" _ prefix)
+ (string-append prefix "ABI()\n")))))
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* "pyvips/__init__.py"
+ (("^( +_vips_libname) = '(libvips.so.42)'"
+ _ var libname)
+ (format #f "~a = '~a/lib/~a'"
+ var #$(this-package-input "vips") libname))
+ (("^( +_gobject_libname) = '(libgobject-2.0.so.0)'"
+ _ var libname)
+ (format #f "~a = '~a/lib/~a'"
+ var #$(this-package-input "glib") libname)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "setup.py" "test")))))))
+ (native-inputs
+ (list python-pyperf
+ python-pytest
+ python-pytest-flake8
+ python-pytest-runner))
+ (inputs
+ (list glib vips))
+ (propagated-inputs
+ (list python-cffi))
+ (home-page "https://github.com/libvips/pyvips")
+ (synopsis "Python bindings for VIPS")
+ (description "The @code{pyvips} package provides Python bindings for VIPS,
+a multithreaded image-processing system with low memory needs.")
+ (license license:expat)))
+
(define-public python-pycparser
(package
(name "python-pycparser")
- branch master updated (a6da02217e -> 2f58393d99), guix-commits, 2022/05/23
- 01/18: scripts: package: Transform before creating manifest entries., guix-commits, 2022/05/23
- 07/18: gnu: python-meshio: Update to 5.3.4., guix-commits, 2022/05/23
- 08/18: gnu: Add python-pyperf., guix-commits, 2022/05/23
- 10/18: gnu: Add python-scooby., guix-commits, 2022/05/23
- 02/18: import: utils: Update list of SPDX licenses., guix-commits, 2022/05/23
- 03/18: gnu: python-plotly: Update to 5.6.0., guix-commits, 2022/05/23
- 04/18: gnu: python-meshio: Remove input labels., guix-commits, 2022/05/23
- 05/18: gnu: python-meshio: Remove trailing booleans., guix-commits, 2022/05/23
- 06/18: gnu: python-meshio: Honor #:tests? flag., guix-commits, 2022/05/23
- 09/18: gnu: Add python-pyvips.,
guix-commits <=
- 13/18: gnu: Add patatt., guix-commits, 2022/05/23
- 11/18: gnu: Add python-pyvista., guix-commits, 2022/05/23
- 12/18: licenses: Add Expat No Attribution license., guix-commits, 2022/05/23
- 14/18: gnu: b4: Drop now unneeded snippet., guix-commits, 2022/05/23
- 15/18: gnu: b4: Enable patch attestation., guix-commits, 2022/05/23
- 16/18: gnu: python-django: Add 3.1.14., guix-commits, 2022/05/23
- 17/18: gnu: Add archivebox., guix-commits, 2022/05/23
- 18/18: gnu: emacs-org-contrib: Do not propogate cider to profile., guix-commits, 2022/05/23