all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Paul A. Patience" <paul@apatience.com>
To: 55060@debbugs.gnu.org
Cc: "Paul A. Patience" <paul@apatience.com>
Subject: [bug#55060] [PATCH v4 6/8] gnu: Add python-pyvips.
Date: Mon, 02 May 2022 21:17:23 +0000	[thread overview]
Message-ID: <20220502211624.689372-7-paul@apatience.com> (raw)
In-Reply-To: <20220502211624.689372-1-paul@apatience.com>

* gnu/packages/python-xyz.scm (python-pyvips): New variable.
---
 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 84f8b991e5..c70379a056 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -172,6 +172,7 @@ (define-module (gnu packages python-xyz)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #: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)
@@ -7582,6 +7583,65 @@ (define-public python-imageio
 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")
--
2.36.0






  parent reply	other threads:[~2022-05-02 21:18 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  1:00 [bug#55060] [PATCH 0/6] gnu: Add python-pyvista Paul A. Patience
2022-04-22  1:02 ` [bug#55060] [PATCH 1/6] gnu: python-meshio: Remove input labels Paul A. Patience
2022-04-22  1:02   ` [bug#55060] [PATCH 2/6] gnu: python-meshio: Remove trailing booleans Paul A. Patience
2022-04-22  1:02   ` [bug#55060] [PATCH 3/6] gnu: python-meshio: Honor #:tests? flag Paul A. Patience
2022-04-22  1:03   ` [bug#55060] [PATCH 4/6] gnu: python-meshio: Update to 5.3.4 Paul A. Patience
2022-04-22  1:03   ` [bug#55060] [PATCH 5/6] gnu: Add python-scooby Paul A. Patience
2022-04-22 17:53     ` Maxime Devos
2022-04-22 17:55     ` Maxime Devos
2022-04-22 18:07     ` Maxime Devos
2022-04-22 19:26       ` Paul A. Patience
2022-04-22 21:43         ` Maxime Devos
2022-04-22 21:46         ` Maxime Devos
2022-04-29 20:52         ` Maxime Devos
2022-05-02 15:00           ` Paul A. Patience
2022-05-02 15:06             ` Maxime Devos
2022-05-02 15:33               ` Paul A. Patience
2022-05-02 16:18                 ` Maxime Devos
2022-04-22  1:03   ` [bug#55060] [PATCH 6/6] gnu: Add python-pyvista Paul A. Patience
2022-04-22 18:04     ` Maxime Devos
2022-04-22 19:36       ` Paul A. Patience
2022-04-22 21:49         ` Maxime Devos
2022-04-22 12:41 ` [bug#55060] [PATCH v2 0/6] " Paul A. Patience
2022-04-22 12:41   ` [bug#55060] [PATCH v2 1/6] gnu: python-meshio: Remove input labels Paul A. Patience
2022-04-22 12:41   ` [bug#55060] [PATCH v2 2/6] gnu: python-meshio: Remove trailing booleans Paul A. Patience
2022-04-22 12:41   ` [bug#55060] [PATCH v2 3/6] gnu: python-meshio: Honor #:tests? flag Paul A. Patience
2022-04-22 12:41   ` [bug#55060] [PATCH v2 4/6] gnu: python-meshio: Update to 5.3.4 Paul A. Patience
2022-04-22 17:36     ` Maxime Devos
2022-04-22 12:41   ` [bug#55060] [PATCH v2 5/6] gnu: Add python-scooby Paul A. Patience
2022-04-22 17:51     ` Maxime Devos
2022-04-22 12:41   ` [bug#55060] [PATCH v2 6/6] gnu: Add python-pyvista Paul A. Patience
2022-04-25 17:55 ` [bug#55060] [PATCH v3 0/6] " Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 1/6] gnu: python-meshio: Remove input labels Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 2/6] gnu: python-meshio: Remove trailing booleans Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 3/6] gnu: python-meshio: Honor #:tests? flag Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 4/6] gnu: python-meshio: Update to 5.3.4 Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 5/6] gnu: Add python-scooby Paul A. Patience
2022-04-25 17:55   ` [bug#55060] [PATCH v3 6/6] gnu: Add python-pyvista Paul A. Patience
2022-05-02 21:16 ` [bug#55060] [PATCH v4 0/8] " Paul A. Patience
2022-05-02 21:16   ` [bug#55060] [PATCH v4 1/8] gnu: python-meshio: Remove input labels Paul A. Patience
2022-05-02 21:16   ` [bug#55060] [PATCH v4 2/8] gnu: python-meshio: Remove trailing booleans Paul A. Patience
2022-05-02 21:16   ` [bug#55060] [PATCH v4 3/8] gnu: python-meshio: Honor #:tests? flag Paul A. Patience
2022-05-02 21:17   ` [bug#55060] [PATCH v4 4/8] gnu: python-meshio: Update to 5.3.4 Paul A. Patience
2022-05-02 21:17   ` [bug#55060] [PATCH v4 5/8] gnu: Add python-pyperf Paul A. Patience
2022-05-02 21:17   ` Paul A. Patience [this message]
2022-05-02 21:17   ` [bug#55060] [PATCH v4 7/8] gnu: Add python-scooby Paul A. Patience
2022-05-02 21:17   ` [bug#55060] [PATCH v4 8/8] gnu: Add python-pyvista Paul A. Patience
2022-05-23 13:56   ` bug#55060: [PATCH 0/6] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502211624.689372-7-paul@apatience.com \
    --to=paul@apatience.com \
    --cc=55060@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.