~ruther/guix-local

dc540ecc371bf614da9b2de6108497f34c07a6fc — Nicolas Graves 4 months ago da484bd
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>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2 files changed, 45 insertions(+), 43 deletions(-)

M gnu/packages/libffi.scm
M gnu/packages/pypy.scm
M gnu/packages/libffi.scm => gnu/packages/libffi.scm +0 -42
@@ 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")

M gnu/packages/pypy.scm => gnu/packages/pypy.scm +45 -1
@@ 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.