From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 1/5] import: pypi: Move runtime dependencies to the propagated-inputs. Date: Sat, 16 Jul 2016 17:23:21 +0200 Message-ID: <1468682605-12622-2-git-send-email-tipecaml@gmail.com> References: <1468682605-12622-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bORRH-00062b-JO for guix-devel@gnu.org; Sat, 16 Jul 2016 11:23:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bORRG-0003hl-D5 for guix-devel@gnu.org; Sat, 16 Jul 2016 11:23:35 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bORRG-0003hN-66 for guix-devel@gnu.org; Sat, 16 Jul 2016 11:23:34 -0400 Received: by mail-wm0-x241.google.com with SMTP id o80so6096583wme.0 for ; Sat, 16 Jul 2016 08:23:34 -0700 (PDT) In-Reply-To: <1468682605-12622-1-git-send-email-tipecaml@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * guix/import/pypi.scm (maybe-inputs): Pass INPUT-TYPE as a parameter. * guix/import/pypi.scm (make-pypi-sexp): Use this parameter. * tests/pypi.scm ("pypi->guix-package", "pypi->guix-package, wheels"): Update accordingly. --- guix/import/pypi.scm | 9 +++++---- tests/pypi.scm | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index efa6908..474974b 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -103,14 +103,14 @@ package on PyPI." ((name version _ ...) (string-append name "-" version ".dist-info")))) -(define (maybe-inputs package-inputs) - "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a +(define (maybe-inputs input-type package-inputs) + "Given a list of PACKAGE-INPUTS, tries to generate the INPUT-TYPE field of a package definition." (match package-inputs (() '()) ((package-inputs ...) - `((inputs (,'quasiquote ,package-inputs)))))) + `((,input-type (,'quasiquote ,package-inputs)))))) (define (guess-requirements source-url wheel-url tarball) "Given SOURCE-URL, WHEEL-URL and a TARBALL of the package, return a list of @@ -266,7 +266,8 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (base32 ,(guix-hash-url temp))))) (build-system python-build-system) - ,@(maybe-inputs (compute-inputs source-url wheel-url temp)) + ,@(maybe-inputs 'propagated-inputs + (compute-inputs source-url wheel-url temp)) (home-page ,home-page) (synopsis ,synopsis) (description ,description) diff --git a/tests/pypi.scm b/tests/pypi.scm index 379c288..ef43d50 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -106,7 +106,7 @@ baz > 13.37") ('base32 (? string? hash))))) ('build-system 'python-build-system) - ('inputs + ('propagated-inputs ('quasiquote (("python-bar" ('unquote 'python-bar)) ("python-baz" ('unquote 'python-baz)) @@ -166,7 +166,7 @@ baz > 13.37") ('base32 (? string? hash))))) ('build-system 'python-build-system) - ('inputs + ('propagated-inputs ('quasiquote (("python-bar" ('unquote 'python-bar)) ("python-baz" ('unquote 'python-baz)) -- 2.6.2