unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 3/3] gnu: Add python-pelican
@ 2015-07-10 22:18 Christopher Allan Webber
  2015-07-19 21:27 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2015-07-10 22:18 UTC (permalink / raw)
  To: guix-devel

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

At last, Pelican itself!

Static site publishing managed by Guix, here we come!


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

From 220db75dbf4700a8c9b342cf68dacce74d864d8a Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Fri, 10 Jul 2015 16:28:01 -0500
Subject: [PATCH 3/3] gnu: Add python-pelican

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6d0f811..4953e27 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2134,6 +2134,57 @@ 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)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("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
+     `(;; 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
+     "A tool to generate a static blog from reStructuredText, Markdown input files,
+and more.  Pelican uses Jinja2 for templating and is very extensible.")
+    ;; No indication that this is "or later" in the source,
+    ;; must assume AGPLv3 only
+    (license agpl3)))
+
 (define-public python-scikit-learn
   (package
     (name "python-scikit-learn")
-- 
2.1.4


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

* Re: [PATCH 3/3] gnu: Add python-pelican
  2015-07-10 22:18 [PATCH 3/3] gnu: Add python-pelican Christopher Allan Webber
@ 2015-07-19 21:27 ` Ludovic Courtès
  2015-07-21  1:22   ` Christopher Allan Webber
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-07-19 21:27 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> skribis:

> From 220db75dbf4700a8c9b342cf68dacce74d864d8a Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Fri, 10 Jul 2015 16:28:01 -0500
> Subject: [PATCH 3/3] gnu: Add python-pelican
>
> * gnu/packages/python.scm (python-pelican): New variables.

[...]

> +    (inputs
> +     `(("python-setuptools" ,python-setuptools)

Move this one to ‘native-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)))

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’.

> +    (arguments
> +     `(;; Requires a lot more packages to do unit tests :P
> +       #:tests? #f

Add “XXX” to make it more prominent.  :-)

> +    (synopsis
> +     "Python-based static site publishing system")

Keep it on a single line.

> +    (description
> +     "A tool to generate a static blog from reStructuredText, Markdown input files,

“Pelican is a tool...”

> +    ;; 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.

Could you send an updated patch?

TIA,
Ludo’.

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

* Re: [PATCH 3/3] gnu: Add python-pelican
  2015-07-19 21:27 ` Ludovic Courtès
@ 2015-07-21  1:22   ` Christopher Allan Webber
  2015-07-26 22:30     ` Thompson, David
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2015-07-21  1:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

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!


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

From c63307bdab42e5f9bed16a7d8263578063158902 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
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


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

* Re: [PATCH 3/3] gnu: Add python-pelican
  2015-07-21  1:22   ` Christopher Allan Webber
@ 2015-07-26 22:30     ` Thompson, David
  0 siblings, 0 replies; 4+ messages in thread
From: Thompson, David @ 2015-07-26 22:30 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Mon, Jul 20, 2015 at 9:22 PM, Christopher Allan Webber
<cwebber@dustycloud.org> wrote:
> Ludovic Courtès writes:
>
>> Could you send an updated patch?
>>
>> TIA,
>> Ludo’.
>
> Done!  And thank you!

Looks good!  I made some minor changes and pushed.

Thanks!

- Dave

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

end of thread, other threads:[~2015-07-26 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 22:18 [PATCH 3/3] gnu: Add python-pelican Christopher Allan Webber
2015-07-19 21:27 ` Ludovic Courtès
2015-07-21  1:22   ` Christopher Allan Webber
2015-07-26 22:30     ` Thompson, David

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).