Message ID | 20160623152004.24065-4-iyzsong@gmail.com |
---|---|
State | New |
Headers |
Received: (qmail 107720 invoked by uid 89); 23 Jun 2016 15:21:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1521, authenticated X-Spam-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 23 Jun 2016 15:21:01 +0000 Received: from localhost ([::1]:37323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <guix-devel-bounces+patchwork=sourceware.org@gnu.org>) id 1bG6R9-0007Vs-8I for patchwork@sourceware.org; Thu, 23 Jun 2016 11:20:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <iyzsong@openmailbox.org>) id 1bG6Qu-0007Ny-97 for guix-devel@gnu.org; Thu, 23 Jun 2016 11:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <iyzsong@openmailbox.org>) id 1bG6Qo-0005sC-0s for guix-devel@gnu.org; Thu, 23 Jun 2016 11:20:43 -0400 Received: from mail.openmailbox.org ([62.4.1.34]:52121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <iyzsong@openmailbox.org>) id 1bG6Qn-0005rz-Pv for guix-devel@gnu.org; Thu, 23 Jun 2016 11:20:37 -0400 Received: by mail.openmailbox.org (Postfix, from userid 20002) id 515D4205838; Thu, 23 Jun 2016 17:20:37 +0200 (CEST) From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com> To: guix-devel@gnu.org Subject: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator. Date: Thu, 23 Jun 2016 23:20:02 +0800 Message-Id: <20160623152004.24065-4-iyzsong@gmail.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160623152004.24065-1-iyzsong@gmail.com> References: <20160623152004.24065-1-iyzsong@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 62.4.1.34 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." <guix-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-devel>, <mailto:guix-devel-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/guix-devel/> List-Post: <mailto:guix-devel@gnu.org> List-Help: <mailto:guix-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-devel>, <mailto:guix-devel-request@gnu.org?subject=subscribe> Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com> Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" <guix-devel-bounces+patchwork=sourceware.org@gnu.org> |
Commit Message
宋文武
June 23, 2016, 3:20 p.m. UTC
* gnu/packages/python.scm (python-email-validator) (python2-email-validator): New variables. --- gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
Comments
On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote: > * gnu/packages/python.scm (python-email-validator) > (python2-email-validator): New variables. > --- > gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > 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 EDNS0.") > (define-public python2-dnspython > (package-with-python2 python-dnspython)) > > +(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. > + (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?
Leo Famulari <leo@famulari.name> writes: > On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote: >> * gnu/packages/python.scm (python-email-validator) >> (python2-email-validator): New variables. >> --- >> gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ >> 1 file changed, 32 insertions(+) >> >> 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 EDNS0.") >> (define-public python2-dnspython >> (package-with-python2 python-dnspython)) >> >> +(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. Should I put dnspython and idna into inputs, or propagated-inputs?
iyzsong@member.fsf.org (宋文武) skribis: > Leo Famulari <leo@famulari.name> writes: > >> On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote: >>> * gnu/packages/python.scm (python-email-validator) >>> (python2-email-validator): New variables. >>> --- >>> gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ >>> 1 file changed, 32 insertions(+) >>> >>> 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 EDNS0.") >>> (define-public python2-dnspython >>> (package-with-python2 python-dnspython)) >>> >>> +(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’re used at run time, they’re not ‘native-inputs’. (In practice we cannot cross-compile Python stuff currently, so this is largely a theoretical concern, but it doesn’t cost much to get it right.) > Should I put dnspython and idna into inputs, or propagated-inputs? If the installed code “import”s them, then they should be propagated. Ludo’.
>> 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’re used at run time, they’re not ‘native-inputs’. (In practice > we cannot cross-compile Python stuff currently, so this is largely a > theoretical concern, but it doesn’t cost much to get it right.) > >> Should I put dnspython and idna into inputs, or propagated-inputs? > > If the installed code “import”s them, then they should be propagated. OK, done. I'm fine with propagated them, but there are many python packages use inputs for runtime depends and rely on the pth file too. What's the current practice? Also, last dicussed at: <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg01020.html>
iyzsong@member.fsf.org (宋文武) skribis: >>> 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’re used at run time, they’re not ‘native-inputs’. (In practice >> we cannot cross-compile Python stuff currently, so this is largely a >> theoretical concern, but it doesn’t cost much to get it right.) >> >>> Should I put dnspython and idna into inputs, or propagated-inputs? >> >> If the installed code “import”s them, then they should be propagated. > OK, done. I'm fine with propagated them, but there are many python > packages use inputs for runtime depends and rely on the pth file too. > > What's the current practice? > > > Also, last dicussed at: > <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg01020.html> AIUI, what Ricardo is saying in this message is that current practice is to propagate inputs that are needed at run time, even though that sucks in some ways. Ludo’.
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 EDNS0.") (define-public python2-dnspython (package-with-python2 python-dnspython)) +(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")))) + (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) + ("python-setuptools" ,python-setuptools))) + (home-page "https://github.com/JoshData/python-email-validator") + (synopsis "Email address validation library for Python") + (description + "This library validates email address syntax and deliverability.") + (license cc0))) + +(define-public python2-email-validator + (package-with-python2 python-email-validator)) +