summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-10-04 23:08:34 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-10-04 23:52:08 +0900
commit9b924694698cad31ff0d72784372f76bd0713b32 (patch)
treefc44ae440d255d07aa285b69935401e5bda6902e
parent693b6c754f820595504b6d7e7780281ba89688e6 (diff)
gnu: Add python2-cffi.fix-pypy3
This is needed by Pypy 3. * gnu/packages/libffi.scm (python2-cffi): New variable. Fixes: #3183 Change-Id: I01f022c28c1a3b801b4a374bd8c52de4a8442d8a
-rw-r--r--gnu/packages/libffi.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 19842a9e9a..bd8e5fb727 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim@guixotic.coop>
+;;; Copyright © 2019, 2021, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020 John Doe <dftxbs3e@free.fr>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
@@ -35,6 +35,7 @@
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (gnu packages check)
+ #:use-module (gnu packages crypto)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
@@ -44,7 +45,9 @@
#:use-module (gnu packages sphinx)
#:use-module (guix build-system gnu)
#:use-module (guix build-system pyproject)
- #:use-module ((guix build-system python) #:select (pypi-uri))
+ #:use-module ((guix build-system python) #:select (pypi-uri
+ package-with-python2
+ python-build-system))
#:use-module (guix build-system ruby))
(define-public libffi
@@ -166,6 +169,24 @@ conversions for values passed between the two languages.")
(description "Foreign Function Interface for Python calling C code.")
(license expat)))
+;;; This Python 2 dependency is needed by the Pypy build system, which is
+;;; unlikely to change in the future.
+(define-public python2-cffi
+ (let ((base (package/inherit python-cffi
+ ;; FIXME: package-with-python2 needs to be updated to accept
+ ;; pyproject-build-system package.
+ (build-system python-build-system)
+ (arguments
+ (cons* #:tests? #f
+ (strip-keyword-arguments
+ '(#:test-flags)
+ (package-arguments python-cffi))))
+ (native-inputs '())
+ (inputs (modify-inputs (package-inputs python-cffi)
+ (append libxcrypt)))
+ (propagated-inputs (list python2-pycparser)))))
+ (package-with-python2 base)))
+
(define-public python-cffi-documentation
(package
(name "python-cffi-documentation")