diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/libffi.scm | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index f87719c7f2d..d6fe695a645 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -45,9 +45,7 @@ #: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 - package-with-python2 - python-build-system)) + #:use-module ((guix build-system python) #:select (pypi-uri)) #:use-module (guix build-system ruby)) (define-public libffi @@ -172,20 +170,44 @@ conversions for values passed between the two languages.") ;;; 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) + (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 - (cons* #:tests? #f - (strip-keyword-arguments - '(#:test-flags) - (package-arguments python-cffi)))) + (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))))) - (package-with-python2 base))) + (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 |
