gnu: python2-cffi: Move to (gnu packages pypy).

* gnu/packages/libffi.scm (python2-cffi): Move from here…
* gnu/packages/pypy.scm (python2-cffi): …to here.

Change-Id: Ib472d2187a118c1dfec62ea9285d48fe63438fbf
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-12-26 04:12:53 +01:00 committed by Andreas Enge
parent 84fbf59c47
commit 15ce7c480a
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3
2 changed files with 45 additions and 43 deletions

View file

@ -167,48 +167,6 @@ 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
(name "python-cffi")
(version "1.15.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cffi" version))
(sha256
(base32 "1y9lr651svbzf1m03s4lqbnbv2byx8f6f0ml7hjm24vvlfwvy06l"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(replace 'build
(lambda _
(invoke "python" "setup.py" "build")))
(replace 'install
(lambda _
(let ((site (string-append #$output
"/lib/python2.7/site-packages/")))
(mkdir-p site)
(setenv "PYTHONPATH" site))
(invoke "python" "./setup.py" "install"
(string-append "--prefix=" #$output)
"--no-compile"))))))
(native-inputs '())
(inputs (modify-inputs (package-inputs python-cffi)
(append libxcrypt)))
(propagated-inputs (list python2-pycparser))
(home-page "https://cffi.readthedocs.io/")
(synopsis "Foreign function interface for Python")
(description "Foreign Function Interface for Python calling C code.")
(license expat))))
(package
(inherit (package-with-python2 base))
(native-inputs (list pkg-config python-setuptools)))))
(define-public python-cffi-documentation
(package
(name "python-cffi-documentation")

View file

@ -25,11 +25,13 @@
#:use-module (gnu packages base)
#:use-module (gnu packages nss)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages dbm)
#:use-module (gnu packages libffi)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tcl)
@ -39,7 +41,49 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu))
#:use-module (guix build-system gnu)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python))
(define-public python2-cffi
(let ((base (package
(name "python-cffi")
(version "1.15.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cffi" version))
(sha256
(base32 "1y9lr651svbzf1m03s4lqbnbv2byx8f6f0ml7hjm24vvlfwvy06l"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(replace 'build
(lambda _
(invoke "python" "setup.py" "build")))
(replace 'install
(lambda _
(let ((site (string-append #$output
"/lib/python2.7/site-packages/")))
(mkdir-p site)
(setenv "PYTHONPATH" site))
(invoke "python" "./setup.py" "install"
(string-append "--prefix=" #$output)
"--no-compile"))))))
(native-inputs '())
(inputs (modify-inputs (package-inputs python-cffi)
(append libxcrypt)))
(propagated-inputs (list python2-pycparser))
(home-page "https://cffi.readthedocs.io/")
(synopsis "Foreign function interface for Python")
(description "Foreign Function Interface for Python calling C code.")
(license license:expat))))
(package
(inherit (package-with-python2 base))
(native-inputs (list pkg-config python-setuptools)))))
;;; This Python 2 alternative implementation is useful for allowing faster
;;; iterations on the development of Pypy 3.