all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python-cheetah.
@ 2016-08-16 11:15 Manolis Ragkousis
  2016-08-18 20:51 ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2016-08-16 11:15 UTC (permalink / raw)
  To: guix-devel

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

This patch adds python2-cheetah.

Manolis

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-cheetah.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-python-cheetah.patch", Size: 2383 bytes --]

From 7899fa820ea826b71375d805185a99cf8de0fc8f Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 16 Aug 2016 14:06:03 +0300
Subject: [PATCH] gnu: Add python-cheetah.

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5cc54d0..a450a0c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9886,3 +9887,40 @@ relays publish about themselves.")
 
 (define-public python2-stem
   (package-with-python2 python-stem))
+
+(define-public python-cheetah
+  (package
+    (name "python-cheetah")
+    (version "2.4.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/"
+             "cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/"
+             "Cheetah-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
+    (build-system python-build-system)
+    (home-page "http://www.cheetahtemplate.org")
+    (synopsis
+     "Python-powered template engine and code generator")
+    (description
+     "Cheetah is an open source template engine and code generation tool.
+It can be used standalone or combined with other tools and frameworks. Web
+development is its principle use, but Cheetah is very flexible and is also
+being used to generate C++ game code, Java, sql, form emails and even Python
+ code.")
+    (license (non-copyleft "file://LICENSE"
+                                   "See COPYING in the distribution."))))
+
+(define-public python2-cheetah
+  (let ((base (package-with-python2 python-cheetah)))
+    (package
+      (inherit base)
+      (name "python2-cheetah")
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ("python2-markdown" ,python2-markdown)
+         ,@(package-native-inputs base))))))
-- 
2.9.2


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

* Re: [PATCH] gnu: Add python-cheetah.
  2016-08-16 11:15 [PATCH] gnu: Add python-cheetah Manolis Ragkousis
@ 2016-08-18 20:51 ` Leo Famulari
  2016-08-21 14:31   ` Manolis Ragkousis
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-08-18 20:51 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: guix-devel

On Tue, Aug 16, 2016 at 02:15:25PM +0300, Manolis Ragkousis wrote:
> This patch adds python2-cheetah.

Does this python2-cheetah work as expected? Needing to make changes to
the Python 2 version of a package is the reason we introduced the
python2-variant system.

> +(define-public python2-cheetah
> +  (let ((base (package-with-python2 python-cheetah)))
> +    (package
> +      (inherit base)
> +      (name "python2-cheetah")
> +      (native-inputs
> +       `(("python2-setuptools" ,python2-setuptools)
> +         ("python2-markdown" ,python2-markdown)
> +         ,@(package-native-inputs base))))))
> -- 
> 2.9.2
> 

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

* Re: [PATCH] gnu: Add python-cheetah.
  2016-08-18 20:51 ` Leo Famulari
@ 2016-08-21 14:31   ` Manolis Ragkousis
  2016-08-21 18:24     ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2016-08-21 14:31 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

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

Hello Leo,

> Does this python2-cheetah work as expected? Needing to make changes to
> the Python 2 version of a package is the reason we introduced the
> python2-variant system.

This package only works with python 2. Actually if you try to build
python-cheetah, you will get:

phase `patch-source-shebangs' succeeded after 0.0 seconds
starting phase `patch-generated-file-shebangs'
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `build'
running "python setup.py" with command "build" and parameters ()
Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    import SetupTools
  File
"/tmp/guix-build-python-cheetah-2.4.4.drv-0/Cheetah-2.4.4/SetupTools.py",
line 50
    except DistutilsPlatformError, x:
                                 ^
SyntaxError: invalid syntax

I followed the other recipes as an example to write this one. Only
python2-cheetah works as expected.

Thank you,
Manolis

[-- Attachment #2: 6bjwal0vhnzldn4sw1wwn0affy0k4f-python-cheetah-2.4.4.drv.bz2 --]
[-- Type: application/x-bzip, Size: 2663 bytes --]

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

* Re: [PATCH] gnu: Add python-cheetah.
  2016-08-21 14:31   ` Manolis Ragkousis
@ 2016-08-21 18:24     ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-08-21 18:24 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: guix-devel

On Sun, Aug 21, 2016 at 05:31:50PM +0300, Manolis Ragkousis wrote:
> Hello Leo,
> 
> > Does this python2-cheetah work as expected? Needing to make changes to
> > the Python 2 version of a package is the reason we introduced the
> > python2-variant system.
> 
> This package only works with python 2. Actually if you try to build
> python-cheetah, you will get:

Okay, I think we should only package the python-2 version of cheetah.

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

end of thread, other threads:[~2016-08-21 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 11:15 [PATCH] gnu: Add python-cheetah Manolis Ragkousis
2016-08-18 20:51 ` Leo Famulari
2016-08-21 14:31   ` Manolis Ragkousis
2016-08-21 18:24     ` Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.