guix_mirror_bot pushed a commit to branch fix-pypy3
in repository guix.
commit 9b924694698cad31ff0d72784372f76bd0713b32
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sat Oct 4 23:08:34 2025 +0900
gnu: Add python2-cffi.
This is needed by Pypy 3.
* gnu/packages/libffi.scm (python2-cffi): New variable.
Fixes: #3183
Change-Id: I01f022c28c1a3b801b4a374bd8c52de4a8442d8a
---
gnu/packages/libffi.scm | 25 +++++++++++++++++++++++--
1 file 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 <[email protected]>
;;; Copyright © 2017, 2019, 2020, 2022 Marius Bakke <[email protected]>
;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
-;;; Copyright © 2019, 2021 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2019, 2021, 2025 Maxim Cournoyer <[email protected]>
;;; Copyright © 2020 John Doe <[email protected]>
;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
;;; Copyright © 2024 Sharlatan Hellseher <[email protected]>
@@ -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")