1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-03 07:45:55 +02:00

gnu: Add python2-cffi.

This is needed by Pypy 3.

* gnu/packages/libffi.scm (python2-cffi): New variable.

Fixes: #3183
Change-Id: I01f022c28c1a3b801b4a374bd8c52de4a8442d8a
Reviewed-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
Maxim Cournoyer
2025-10-04 23:08:34 +09:00
parent 91e70b9c01
commit fa585ebd6a
+23 -2
View File
@@ -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")