guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] gnu: Add python-pelican


From: Christopher Allan Webber
Subject: Re: [PATCH 3/3] gnu: Add python-pelican
Date: Mon, 20 Jul 2015 18:22:35 -0700

Ludovic Courtès writes:

>> +    (inputs
>> +     `(("python-setuptools" ,python-setuptools)
>
> Move this one to ‘native-inputs’.

Done!  Though... I think we should be careful with the assumption that
this is true or should be done without looking careful.  For example,
MediaGoblin actually *uses* setuptools in the package itself, or more
specifically pkg_resources which allows you to find the paths of static
files bundled directly with python modules.

So unless we know we don't need the input, we should maybe include this
in the normal inputs?  But I'm unsure.  Anyway, it seems fine in this
case.

>> +       ("python-feedgenerator" ,python-feedgenerator)
>> +       ("python-jinja2" ,python-jinja2)
>> +       ("python-pygments" ,python-pygments)
>> +       ("python-docutils" ,python-docutils)
>> +       ("python-pytz" ,python-pytz)
>> +       ("python-blinker" ,python-blinker)
>> +       ("python-unidecode" ,python-unidecode)
>> +       ("python-six" ,python-six)
>> +       ("python-dateutil-2" ,python-dateutil-2)))
>
> If Pelican is simply meant to be used as a command-line tool, this is
> fine.  Otherwise, if it’s meant as a Python library (or both), these
> probably need to be moved to ‘propagated-inputs’.

It's a command line tool.

>> +    (arguments
>> +     `(;; Requires a lot more packages to do unit tests :P
>> +       #:tests? #f
>
> Add “XXX” to make it more prominent.  :-)

Done

>> +    (synopsis
>> +     "Python-based static site publishing system")
>
> Keep it on a single line.

Done

>> +    (description
>> +     "A tool to generate a static blog from reStructuredText, Markdown 
>> input files,
>
> “Pelican is a tool...”

Done

>> +    ;; No indication that this is "or later" in the source,
>> +    ;; must assume AGPLv3 only
>> +    (license agpl3)))
>
> Unless the license version is explicitly specified somewhere, the
> recipient can use any version of the license (per Section 14 of GPLv3),
> which we’d translate it as ‘agpl3+’ here.

That's good news!  And I didn't know about that!

> Could you send an updated patch?
>
> TIA,
> Ludo’.

Done!  And thank you!

>From c63307bdab42e5f9bed16a7d8263578063158902 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <address@hidden>
Date: Fri, 10 Jul 2015 16:28:01 -0500
Subject: [PATCH 2/2] gnu: Add python-pelican

* gnu/packages/python.scm (python-pelican): New variables.
---
 gnu/packages/python.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 12d8c35..b8d684b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -28,7 +28,7 @@
 (define-module (gnu packages python)
   #:use-module ((guix licenses)
                 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 
x11-style
-                          gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ 
agpl3
+                          gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ 
agpl3+
                           psfl public-domain x11-style))
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
   #:use-module (gnu packages)
@@ -2185,6 +2185,56 @@ interested parties to subscribe to events, or 
\"signals\".")
 (define-public python2-blinker
   (package-with-python2 python-blinker))
 
+(define-public python-pelican
+  (package
+    (name "python-pelican")
+    (version "3.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/source/p/pelican/pelican-";
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     `(("python-feedgenerator" ,python-feedgenerator)
+       ("python-jinja2" ,python-jinja2)
+       ("python-pygments" ,python-pygments)
+       ("python-docutils" ,python-docutils)
+       ("python-pytz" ,python-pytz)
+       ("python-blinker" ,python-blinker)
+       ("python-unidecode" ,python-unidecode)
+       ("python-six" ,python-six)
+       ("python-dateutil-2" ,python-dateutil-2)))
+    (home-page "http://getpelican.com/";)
+    (arguments
+     `(;; XXX Requires a lot more packages to do unit tests :P
+       #:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-before
+                   'install 'adjust-requires
+                   ;; Since feedgenerator is installed from git,
+                   ;; it doesn't conform to the version requirements.
+                   ;;
+                   ;; We *do have* "feedgenerator >= 1.6", but strip off the
+                   ;; version requirement so setuptools doesn't get confused.
+                   (lambda _
+                     (substitute* "setup.py"
+                       (("['\"]feedgenerator.*?['\"]")
+                        "'feedgenerator'")))))))
+    (synopsis "Python-based static site publishing system")
+    (description
+     "Pelican is a tool to generate a static blog from reStructuredText,
+Markdown input files, and more.  Pelican uses Jinja2 for templating
+and is very extensible.")
+    (license agpl3+)))
+
 (define-public python-scikit-learn
   (package
     (name "python-scikit-learn")
-- 
2.1.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]