From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator. Date: Sun, 26 Jun 2016 23:03:43 +0200 Message-ID: <87y45rk6hc.fsf@gnu.org> References: <20160623152004.24065-1-iyzsong@gmail.com> <20160623152004.24065-4-iyzsong@gmail.com> <20160625175837.GH22624@jasmine> <8737o04qkz.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHHDd-0001dO-2H for guix-devel@gnu.org; Sun, 26 Jun 2016 17:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHHDY-0008Qy-20 for guix-devel@gnu.org; Sun, 26 Jun 2016 17:03:52 -0400 In-Reply-To: <8737o04qkz.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Sun, 26 Jun 2016 10:43:56 +0800") 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: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > Leo Famulari writes: > >> On Thu, Jun 23, 2016 at 11:20:02PM +0800, =E5=AE=8B=E6=96=87=E6=AD=A6 wr= ote: >>> * gnu/packages/python.scm (python-email-validator) >>> (python2-email-validator): New variables. >>> --- >>> gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ >>> 1 file changed, 32 insertions(+) >>>=20 >>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm >>> index ff3cb99..68123cc 100644 >>> --- a/gnu/packages/python.scm >>> +++ b/gnu/packages/python.scm >>> @@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS= 0.") >>> (define-public python2-dnspython >>> (package-with-python2 python-dnspython)) >>>=20=20 >>> +(define-public python-email-validator >>> + (package >>> + (name "python-email-validator") >>> + (version "1.0.1") >>> + (source >>> + (origin (method url-fetch) >>> + (uri (pypi-uri "email_validator" version)) >>> + (sha256 >>> + (base32 >>> + "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw")= ))) >> >> The indentation should be shifted to the right. > OK. > >> >>> + (build-system python-build-system) >>> + (arguments >>> + '(#:phases >>> + (modify-phases %standard-phases >>> + (add-before 'build 'use-dnspython >>> + (lambda _ >>> + (substitute* "setup.py" >>> + (("dnspython3") "dnspython")) >>> + #t))))) >>> + (native-inputs >>> + `(("python-dnspython" ,python-dnspython) >>> + ("python-idna" ,python-idna) >> >> Do dnspython and idna need to be native-inputs? Are they only used to >> build? > They're needed at runtime, and included in the pth file. > But I'm not sure whether or not inputs for python should be > native-inputs, I never cross build python modules for other > architertures. If they=E2=80=99re used at run time, they=E2=80=99re not =E2=80=98native-in= puts=E2=80=99. (In practice we cannot cross-compile Python stuff currently, so this is largely a theoretical concern, but it doesn=E2=80=99t cost much to get it right.) > Should I put dnspython and idna into inputs, or propagated-inputs? If the installed code =E2=80=9Cimport=E2=80=9Ds them, then they should be p= ropagated. Ludo=E2=80=99.