unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gnu: Add python-wtforms.
@ 2016-02-12 19:43 Christopher Allan Webber
  2016-02-12 21:52 ` Thompson, David
  2016-02-12 22:02 ` Leo Famulari
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Allan Webber @ 2016-02-12 19:43 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0002-gnu-Add-python-wtforms.patch --]
[-- Type: text/x-patch, Size: 1723 bytes --]

From 8de2a4095987efcf1d9b8f1b5d71ba6fc57e12e8 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Thu, 11 Feb 2016 16:16:45 -0800
Subject: [PATCH 2/3] gnu: Add python-wtforms

* gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
---
 gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f2e5ec0..4a4e298 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -7514,6 +7514,34 @@ input.  (Note that this is mostly a legacy library; you may wish to look at
 python-xdo for newer bindings.)")
     (license bsd-3)))
 
+(define-public python-wtforms
+  (package
+    (name "python-wtforms")
+    (version "2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "WTForms" version ".zip"))
+       (sha256
+        (base32
+         "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (home-page "http://wtforms.simplecodes.com/")
+    (synopsis
+     "Form validation and rendering library for Python web development")
+    (description
+     "WTForms is a flexible forms validation and rendering library
+for Python web development.  It is very similar to the web form API
+available in Django, but is a standalone package.")
+    (license bsd-3)))
+
+(define-public python2-wtforms
+  (package-with-python2 python-wtforms))
+
 ;;pyversion_install_requires = []
 ;;if PY2:
 ;;    pyversion_install_requires.append('argparse')  # only for < 2.7
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-12 19:43 gnu: Add python-wtforms Christopher Allan Webber
@ 2016-02-12 21:52 ` Thompson, David
  2016-02-12 23:42   ` Christopher Allan Webber
  2016-02-12 22:02 ` Leo Famulari
  1 sibling, 1 reply; 9+ messages in thread
From: Thompson, David @ 2016-02-12 21:52 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

This looks good, Chris!  I can tell by looking at the diff that it's
based on the wip-mediagoblin.  If it cleanly applies on master then I
say "push"!

- Dave

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-12 19:43 gnu: Add python-wtforms Christopher Allan Webber
  2016-02-12 21:52 ` Thompson, David
@ 2016-02-12 22:02 ` Leo Famulari
  1 sibling, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2016-02-12 22:02 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Fri, Feb 12, 2016 at 11:43:56AM -0800, Christopher Allan Webber wrote:
> From 8de2a4095987efcf1d9b8f1b5d71ba6fc57e12e8 Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Thu, 11 Feb 2016 16:16:45 -0800
> Subject: [PATCH 2/3] gnu: Add python-wtforms
> 
> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.

It looks good to me, but I wonder if the python-3 variant really needs
setuptools? If so, okay. If not, can you use the new python2-variant
system [0] to provide setuptools for python2-wtforms?

[0] Introduced in 48b311b1b3ba

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-12 21:52 ` Thompson, David
@ 2016-02-12 23:42   ` Christopher Allan Webber
  2016-02-12 23:57     ` Leo Famulari
  2016-02-13 21:55     ` Christopher Allan Webber
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Allan Webber @ 2016-02-12 23:42 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

Thompson, David writes:

> This looks good, Chris!  I can tell by looking at the diff that it's
> based on the wip-mediagoblin.  If it cleanly applies on master then I
> say "push"!
>
> - Dave

Ha, yeah.  I'm trying to get through as many MediaGoblin deps as I can.

Leo Famulari writes:

> On Fri, Feb 12, 2016 at 11:43:56AM -0800, Christopher Allan Webber wrote:
>> From 8de2a4095987efcf1d9b8f1b5d71ba6fc57e12e8 Mon Sep 17 00:00:00 2001
>> From: Christopher Allan Webber <cwebber@dustycloud.org>
>> Date: Thu, 11 Feb 2016 16:16:45 -0800
>> Subject: [PATCH 2/3] gnu: Add python-wtforms
>> 
>> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
>
> It looks good to me, but I wonder if the python-3 variant really needs
> setuptools? If so, okay. If not, can you use the new python2-variant
> system [0] to provide setuptools for python2-wtforms?
>
> [0] Introduced in 48b311b1b3ba

Okay, I'll give that a try, and will make an adjustment if appropriate,
and regardless, push after figuring that out.

Thanks to both of you!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-12 23:42   ` Christopher Allan Webber
@ 2016-02-12 23:57     ` Leo Famulari
  2016-02-13 21:55     ` Christopher Allan Webber
  1 sibling, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2016-02-12 23:57 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Fri, Feb 12, 2016 at 03:42:43PM -0800, Christopher Allan Webber wrote:
> Thompson, David writes:
> 
> > This looks good, Chris!  I can tell by looking at the diff that it's
> > based on the wip-mediagoblin.  If it cleanly applies on master then I
> > say "push"!
> >
> > - Dave
> 
> Ha, yeah.  I'm trying to get through as many MediaGoblin deps as I can.

That's awesome! I can't wait to try MediaGoblin with the dependency
graph managed by Guix :)

> 
> Leo Famulari writes:
> 
> > On Fri, Feb 12, 2016 at 11:43:56AM -0800, Christopher Allan Webber wrote:
> >> From 8de2a4095987efcf1d9b8f1b5d71ba6fc57e12e8 Mon Sep 17 00:00:00 2001
> >> From: Christopher Allan Webber <cwebber@dustycloud.org>
> >> Date: Thu, 11 Feb 2016 16:16:45 -0800
> >> Subject: [PATCH 2/3] gnu: Add python-wtforms
> >> 
> >> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
> >
> > It looks good to me, but I wonder if the python-3 variant really needs
> > setuptools? If so, okay. If not, can you use the new python2-variant
> > system [0] to provide setuptools for python2-wtforms?
> >
> > [0] Introduced in 48b311b1b3ba
> 
> Okay, I'll give that a try, and will make an adjustment if appropriate,
> and regardless, push after figuring that out.
> 
> Thanks to both of you!
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-12 23:42   ` Christopher Allan Webber
  2016-02-12 23:57     ` Leo Famulari
@ 2016-02-13 21:55     ` Christopher Allan Webber
  2016-02-13 22:23       ` Leo Famulari
  1 sibling, 1 reply; 9+ messages in thread
From: Christopher Allan Webber @ 2016-02-13 21:55 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

Christopher Allan Webber writes:

> Thompson, David writes:
>
>> This looks good, Chris!  I can tell by looking at the diff that it's
>> based on the wip-mediagoblin.  If it cleanly applies on master then I
>> say "push"!
>>
>> - Dave
>
> Ha, yeah.  I'm trying to get through as many MediaGoblin deps as I can.
>
> Leo Famulari writes:
>
>> On Fri, Feb 12, 2016 at 11:43:56AM -0800, Christopher Allan Webber wrote:
>>> From 8de2a4095987efcf1d9b8f1b5d71ba6fc57e12e8 Mon Sep 17 00:00:00 2001
>>> From: Christopher Allan Webber <cwebber@dustycloud.org>
>>> Date: Thu, 11 Feb 2016 16:16:45 -0800
>>> Subject: [PATCH 2/3] gnu: Add python-wtforms
>>> 
>>> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
>>
>> It looks good to me, but I wonder if the python-3 variant really needs
>> setuptools? If so, okay. If not, can you use the new python2-variant
>> system [0] to provide setuptools for python2-wtforms?
>>
>> [0] Introduced in 48b311b1b3ba
>
> Okay, I'll give that a try, and will make an adjustment if appropriate,
> and regardless, push after figuring that out.
>
> Thanks to both of you!

Well, I think it's significant enough of a change where I should get
some validation that everything looks right before I push.  New version,
ahoy!  Is it ok?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-wtforms.patch --]
[-- Type: text/x-patch, Size: 1696 bytes --]

From 0b3543265a1597206f28ed343d40812c021575d4 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Sat, 13 Feb 2016 13:42:51 -0800
Subject: [PATCH] gnu: Add python-wtforms

* gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3758eed..756bb0d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -7509,3 +7509,32 @@ input.  (Note that this is mostly a legacy library; you may wish to look at
 python-xdo for newer bindings.)")
     (license bsd-3)))
 
+(define-public python-wtforms
+  (package
+    (name "python-wtforms")
+    (version "2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "WTForms" version ".zip"))
+       (sha256
+        (base32
+         "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "http://wtforms.simplecodes.com/")
+    (synopsis
+     "Form validation and rendering library for Python web development")
+    (description
+     "WTForms is a flexible forms validation and rendering library
+for Python web development.  It is very similar to the web form API
+available in Django, but is a standalone package.")
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-wtforms))))))
+
+(define-public python2-wtforms
+  (package
+    (inherit python-wtforms)
+    (name "python2-wtforms")
+    (inputs `(("python2-setuptools" ,python2-setuptools)))))
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-13 21:55     ` Christopher Allan Webber
@ 2016-02-13 22:23       ` Leo Famulari
  2016-02-13 22:57         ` Christopher Allan Webber
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2016-02-13 22:23 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

On Sat, Feb 13, 2016 at 01:55:01PM -0800, Christopher Allan Webber wrote:
> Christopher Allan Webber writes:

[...]

> >>> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
> >>
> >> It looks good to me, but I wonder if the python-3 variant really needs
> >> setuptools? If so, okay. If not, can you use the new python2-variant
> >> system [0] to provide setuptools for python2-wtforms?
> >>
> >> [0] Introduced in 48b311b1b3ba
> >
> > Okay, I'll give that a try, and will make an adjustment if appropriate,
> > and regardless, push after figuring that out.
> >
> > Thanks to both of you!
> 
> Well, I think it's significant enough of a change where I should get
> some validation that everything looks right before I push.  New version,
> ahoy!  Is it ok?

I believe that you still must call 'package-with-python2' in the
python-2 variant, and the argument to that should be
(strip-python2-variant python-foo).

I've attached an example commit that seems to work, from one of my WIP
branches.

[-- Attachment #2: 0001-gnu-Add-python2-atomicwrites.patch --]
[-- Type: text/x-diff, Size: 1177 bytes --]

From c5e63b1f8788e44657a5f508554dc8c21d00c3b4 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Thu, 28 Jan 2016 00:42:33 -0500
Subject: [PATCH] gnu: Add python2-atomicwrites.

* gnu/packages/python.scm (python2-atomicwrites): New variable.
---
 gnu/packages/python.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5b988c1..3f9886d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6751,7 +6751,14 @@ WebSocket usage in Python programs.")
     (description "Library for atomic file writes using platform dependent tools
 for atomic filesystem operations.")
     (home-page "https://github.com/untitaker/python-atomicwrites")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-atomicwrites))))))
+
+(define-public python2-atomicwrites
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-atomicwrites)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))))
 
 (define-public python-requests-toolbelt
   (package
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-13 22:23       ` Leo Famulari
@ 2016-02-13 22:57         ` Christopher Allan Webber
  2016-02-13 23:07           ` Christopher Allan Webber
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Allan Webber @ 2016-02-13 22:57 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

Leo Famulari writes:

> On Sat, Feb 13, 2016 at 01:55:01PM -0800, Christopher Allan Webber wrote:
>> Christopher Allan Webber writes:
>
> [...]
>
>> >>> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
>> >>
>> >> It looks good to me, but I wonder if the python-3 variant really needs
>> >> setuptools? If so, okay. If not, can you use the new python2-variant
>> >> system [0] to provide setuptools for python2-wtforms?
>> >>
>> >> [0] Introduced in 48b311b1b3ba
>> >
>> > Okay, I'll give that a try, and will make an adjustment if appropriate,
>> > and regardless, push after figuring that out.
>> >
>> > Thanks to both of you!
>> 
>> Well, I think it's significant enough of a change where I should get
>> some validation that everything looks right before I push.  New version,
>> ahoy!  Is it ok?
>
> I believe that you still must call 'package-with-python2' in the
> python-2 variant, and the argument to that should be
> (strip-python2-variant python-foo).
>
> I've attached an example commit that seems to work, from one of my WIP
> branches.

Ah, you're right!  New patch!

 - Chris


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-wtforms.patch --]
[-- Type: text/x-patch, Size: 1759 bytes --]

From 6d3d18425409a738b6e341d9f1640f048a12300a Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Sat, 13 Feb 2016 13:42:51 -0800
Subject: [PATCH] gnu: Add python-wtforms

* gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
---
 gnu/packages/python.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3758eed..c9aabc8 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -7509,3 +7509,33 @@ input.  (Note that this is mostly a legacy library; you may wish to look at
 python-xdo for newer bindings.)")
     (license bsd-3)))
 
+(define-public python-wtforms
+  (package
+    (name "python-wtforms")
+    (version "2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "WTForms" version ".zip"))
+       (sha256
+        (base32
+         "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "http://wtforms.simplecodes.com/")
+    (synopsis
+     "Form validation and rendering library for Python web development")
+    (description
+     "WTForms is a flexible forms validation and rendering library
+for Python web development.  It is very similar to the web form API
+available in Django, but is a standalone package.")
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-wtforms))))))
+
+(define-public python2-wtforms
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-wtforms)))
+    (name "python2-wtforms")
+    (inputs `(("python2-setuptools" ,python2-setuptools)))))
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: gnu: Add python-wtforms.
  2016-02-13 22:57         ` Christopher Allan Webber
@ 2016-02-13 23:07           ` Christopher Allan Webber
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Allan Webber @ 2016-02-13 23:07 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Christopher Allan Webber writes:

> Leo Famulari writes:
>
>> On Sat, Feb 13, 2016 at 01:55:01PM -0800, Christopher Allan Webber wrote:
>>> Christopher Allan Webber writes:
>>
>> [...]
>>
>>> >>> * gnu/packages/python.scm (python-wtforms, python2-wtforms): New variables.
>>> >>
>>> >> It looks good to me, but I wonder if the python-3 variant really needs
>>> >> setuptools? If so, okay. If not, can you use the new python2-variant
>>> >> system [0] to provide setuptools for python2-wtforms?
>>> >>
>>> >> [0] Introduced in 48b311b1b3ba
>>> >
>>> > Okay, I'll give that a try, and will make an adjustment if appropriate,
>>> > and regardless, push after figuring that out.
>>> >
>>> > Thanks to both of you!
>>> 
>>> Well, I think it's significant enough of a change where I should get
>>> some validation that everything looks right before I push.  New version,
>>> ahoy!  Is it ok?
>>
>> I believe that you still must call 'package-with-python2' in the
>> python-2 variant, and the argument to that should be
>> (strip-python2-variant python-foo).
>>
>> I've attached an example commit that seems to work, from one of my WIP
>> branches.
>
> Ah, you're right!  New patch!
>
>  - Chris

Leo also pointed out that the (name) redefinition might not be needed,
and indeed it wasn't!

And with that, pushed.  Whew!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-13 23:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 19:43 gnu: Add python-wtforms Christopher Allan Webber
2016-02-12 21:52 ` Thompson, David
2016-02-12 23:42   ` Christopher Allan Webber
2016-02-12 23:57     ` Leo Famulari
2016-02-13 21:55     ` Christopher Allan Webber
2016-02-13 22:23       ` Leo Famulari
2016-02-13 22:57         ` Christopher Allan Webber
2016-02-13 23:07           ` Christopher Allan Webber
2016-02-12 22:02 ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).