Patchwork [01/11] gnu: Add python-flask-wtf.

login
register
mail settings
Submitter ng0
Date Dec. 11, 2016, 6:12 p.m.
Message ID <20161211181237.24485-2-ng0@libertad.pw>
Download mbox | patch
Permalink /patch/18365/
State New
Headers show

Comments

ng0 - Dec. 11, 2016, 6:12 p.m.
* gnu/packages/python.scm (python-flask-wtf): New variable.
---
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
Leo Famulari - Dec. 11, 2016, 10:39 p.m.
On Sun, Dec 11, 2016 at 06:12:27PM +0000, ng0 wrote:
> * gnu/packages/python.scm (python-flask-wtf): New variable.

> +    (propagated-inputs
> +     `(("python-flask-babel" ,python-flask-babel)
> +       ("python-nose" ,python-nose)))

Nose is a tool for running unit tests. Should python-nose be a
native-input here?

Also, I noticed the test suite failed because python-wtforms was not
available.
ng0 - Dec. 11, 2016, 11:05 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Sun, Dec 11, 2016 at 06:12:27PM +0000, ng0 wrote:
>> * gnu/packages/python.scm (python-flask-wtf): New variable.
>
>> +    (propagated-inputs
>> +     `(("python-flask-babel" ,python-flask-babel)
>> +       ("python-nose" ,python-nose)))
>
> Nose is a tool for running unit tests. Should python-nose be a
> native-input here?
>
> Also, I noticed the test suite failed because python-wtforms was not
> available.
>

Ah, thanks.
Yeah I need to make my notes about the new python system.. I had
everything propagated now.. which is false it seems.
Leo Famulari - Dec. 11, 2016, 11:22 p.m.
On Sun, Dec 11, 2016 at 11:05:56PM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Sun, Dec 11, 2016 at 06:12:27PM +0000, ng0 wrote:
> >> * gnu/packages/python.scm (python-flask-wtf): New variable.
> >
> >> +    (propagated-inputs
> >> +     `(("python-flask-babel" ,python-flask-babel)
> >> +       ("python-nose" ,python-nose)))
> >
> > Nose is a tool for running unit tests. Should python-nose be a
> > native-input here?
> >
> > Also, I noticed the test suite failed because python-wtforms was not
> > available.
> >
> 
> Ah, thanks.
> Yeah I need to make my notes about the new python system.. I had
> everything propagated now.. which is false it seems.

My understanding is that everything used at run-time should be
propagated, but things used only while building are still native-inputs.
Hartmut Goebel - Dec. 12, 2016, 10:26 a.m.
Am 12.12.2016 um 00:05 schrieb ng0:
> Yeah I need to make my notes about the new python system.. I had
> everything propagated now.. which is false it seems.

We could add nose to the lint checkers, should we?
Hartmut Goebel - Dec. 12, 2016, 10:27 a.m.
Am 12.12.2016 um 00:22 schrieb Leo Famulari:
> My understanding is that everything used at run-time should be
> propagated, but things used only while building are still native-inputs.

That's it :-)

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c46d51724..d9796b8e5 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9191,6 +9191,31 @@  presume or force a developer to use a particular tool or library.")
 (define-public python2-flask
   (package-with-python2 python-flask))
 
+(define-public python-flask-wtf
+  (package
+    (name "python-flask-wtf")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Flask-WTF" version))
+       (sha256
+        (base32
+         "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask-babel" ,python-flask-babel)
+       ("python-nose" ,python-nose)))
+  (home-page "https://github.com/lepture/flask-wtf")
+  (synopsis "Simple integration of Flask and WTForms")
+  (description
+   "Simple integration of Flask and WTForms, including CSRF,
+file upload, and reCAPTCHA.")
+  (license license:bsd-3)))
+
+(define-public python2-flask-wtf
+  (package-with-python2 python-flask-wtf))
+
 (define-public python-cookies
   (package
     (name "python-cookies")