From 22e311a6c36bff56cbf6a0d317d50825a1d70d1f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 28 Jul 2025 11:03:51 +0900 Subject: [PATCH] gnu: Add pythoncapi-compat. * gnu/packages/python-xyz.scm (pythoncapi-compat): New variable. Change-Id: Id1b1d09539c2beaa6ad6c89f9babf5740a4a8ad7 --- gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 76bdb3d7f1a737b89a12de672204d3ca889c651d..ce7ef03d470a612bcb10be933b37180139e2b57b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -52,7 +52,7 @@ ;;; Copyright © 2018-2025 Nicolas Goaziou ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2018, 2019, 2021, 2023 Clément Lassieur -;;; Copyright © 2018-2024 Maxim Cournoyer +;;; Copyright © 2018-2025 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian ;;; Copyright © 2015, 2018 Pjotr Prins @@ -299,6 +299,7 @@ #:use-module (guix packages) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system pyproject) @@ -40139,7 +40140,33 @@ file formats. Python XMP Toolkit is wrapping Exempi (using ctypes), a C/C++ XMP library based on Adobe XMP Toolkit, ensuring that future updates to the XMP standard are easily incorporated into the library with a minimum amount of work.") - (license license:bsd-3))) + (license license:bsd-3))) + +(define-public pythoncapi-compat + ;; No release nor tags: use the latest commit. + (let ((commit "b541b98df1e3e5aabb5def27422a75c876f5a88a") + (revision "0")) + (package + (name "pythoncapi-compat") + (version "0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/python/pythoncapi-compat") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "09935gybfj2wqbf6jmn61m21qnx3za8xjv375n3daq8l3cs6dmmx")))) + (build-system copy-build-system) + (arguments (list #:install-plan + #~'(("pythoncapi_compat.h" "include/")))) + (home-page "https://github.com/python/pythoncapi-compat") + (synopsis "Python C API compatibility") + (description "The pythoncapi-compat project can be used to write a C or +C++ extension supporting a wide range of Python versions with a single code +base, via the @file{pythoncapi_compat.h} header file.") + (license license:bsd-0)))) ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances