guix_mirror_bot pushed a commit to branch next-master
in repository guix.

commit 6c00512b938eeece4a2d355f5f385f975ebe77d3
Author: Nicolas Graves <[email protected]>
AuthorDate: Fri Dec 26 04:12:53 2025 +0100

    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 <[email protected]>
---
 gnu/packages/libffi.scm | 42 ------------------------------------------
 gnu/packages/pypy.scm   | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 45 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index d6fe695a64..b530a01c42 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -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")
diff --git a/gnu/packages/pypy.scm b/gnu/packages/pypy.scm
index ad48abf599..3f757b536c 100644
--- a/gnu/packages/pypy.scm
+++ b/gnu/packages/pypy.scm
@@ -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.

Reply via email to