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.
>From c5e63b1f8788e44657a5f508554dc8c21d00c3b4 Mon Sep 17 00:00:00 2001
From: Leo Famulari <l...@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

Reply via email to