gnu: python-serpent: Declare python2 variant.
authorMarius Bakke <mbakke@fastmail.com>
Thu, 9 Apr 2020 12:05:14 +0000 (14:05 +0200)
committerMarius Bakke <mbakke@fastmail.com>
Thu, 9 Apr 2020 18:04:44 +0000 (20:04 +0200)
* gnu/packages/python-xyz.scm (python-serpent)[properties]: New field.
(python2-serpent): New public variable.

gnu/packages/python-xyz.scm

index 2095648..f2e75d5 100644 (file)
@@ -981,8 +981,17 @@ to rebuild the original object tree.
 
 Because only safe literals are encoded, it is safe to send serpent data to
 other machines, such as over the network.")
+    (properties `((python2-variant . ,(delay python2-serpent))))
     (license license:expat)))
 
+(define-public python2-serpent
+  (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
+    (package
+      (inherit base)
+      (propagated-inputs
+       `(("python-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-setuptools
   (package
     (name "python-setuptools")