GNU bug report logs - #46823
[PATCH 1/3] gnu: Add python-readability.

Previous Next

Package: guix-patches;

Reported by: Léo Le Bouter <lle-bout <at> zaclys.net>

Date: Sat, 27 Feb 2021 22:36:02 UTC

Severity: normal

Tags: patch

Done: Léo Le Bouter <lle-bout <at> zaclys.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46823 in the body.
You can then email your comments to 46823 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 27 Feb 2021 22:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Léo Le Bouter <lle-bout <at> zaclys.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 27 Feb 2021 22:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: guix-patches <at> gnu.org
Cc: Léo Le Bouter <lle-bout <at> zaclys.net>
Subject: [PATCH 1/3] gnu: Add python-readability.
Date: Sat, 27 Feb 2021 23:34:38 +0100
* gnu/packages/python-xyz.scm (python-readability): New variable.
---
 gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c10a55e8b6..1ff51d1b2c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23985,3 +23985,26 @@ and frame grabber interface.")
     (description
       "A screencast tool to display your keys inspired by Screenflick.")
     (license license:gpl3+)))
+
+(define-public python-readability
+  (package
+    (name "python-readability")
+    (version "0.3.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "readability" version))
+        (sha256
+          (base32
+            "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
+    (build-system python-build-system)
+    (home-page
+      "https://github.com/andreasvc/readability/")
+    (synopsis
+      "Measure the readability of a given text using surface
+characteristics")
+    (description
+      "An implementation of traditional readability measures based on simple
+surface characteristics.  These measures are basically linear regressions
+based on the number of words, syllables, and sentences.")
+    (license license:asl2.0)))
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 27 Feb 2021 22:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 46823 <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: 46823 <at> debbugs.gnu.org
Cc: Léo Le Bouter <lle-bout <at> zaclys.net>
Subject: [PATCH 2/3] gnu: Add python-listparser.
Date: Sat, 27 Feb 2021 23:36:30 +0100
* gnu/packages/python-xyz.scm (python-listparser): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1ff51d1b2c..569a49ef36 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23932,6 +23932,26 @@ and frame grabber interface.")
                ;; Yet another variant of the X/MIT license.
                "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
 
+(define-public python-listparser
+  (package
+    (name "python-listparser")
+    (version "0.18")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "listparser" version))
+        (sha256
+          (base32
+            "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
+    (build-system python-build-system)
+    (home-page
+      "https://github.com/kurtmckee/listparser")
+    (synopsis
+      "Parse subscription lists in Python")
+    (description
+      "Parse OPML, FOAF, and iGoogle subscription lists in Python.")
+    (license license:expat)))
+
 (define-public python-screenkey
   (package
     (name "python-screenkey")
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 27 Feb 2021 22:37:02 GMT) Full text and rfc822 format available.

Message #11 received at 46823 <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: 46823 <at> debbugs.gnu.org
Cc: Léo Le Bouter <lle-bout <at> zaclys.net>
Subject: [PATCH 3/3] gnu: Add gfeeds.
Date: Sat, 27 Feb 2021 23:36:31 +0100
* gnu/packages/gnome-xyz.scm (gfeeds): New variable.
---
 gnu/packages/gnome-xyz.scm | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index aa7949478c..47288b76fe 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -31,6 +31,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
+  #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -45,11 +46,16 @@
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages image)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ssh)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml))
 
 (define-public arc-icon-theme
@@ -929,3 +935,65 @@ pallete.")
 outputs notifications to STDOUT in order to allow the user to process
 notifications any way they prefer.")
       (license license:expat))))
+
+(define-public gfeeds
+  (package
+    (name "gfeeds")
+    (version "0.16.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://gitlab.gnome.org/World/gfeeds/-/archive/" version
+                "/gfeeds-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "05gwwzqfz29m477imd5vh84jfla1wnklwpc2sdxnqli72wg08fli"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-mpv-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "gfeeds/confManager.py"
+               (("mpv") (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
+             #t))
+         (add-after 'install 'wrap-gfeeds
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append
+                            (assoc-ref outputs "out") "/bin/gfeeds")
+               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+               `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
+               `("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS"))))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)
+       ("glib:bin" ,glib "bin")
+       ("gtk+:bin" ,gtk+ "bin")))
+    (inputs
+     `(("python-pygobject" ,python-pygobject)
+       ("python-feedparser" ,python-feedparser)
+       ("python-pytz" ,python-pytz)
+       ("python-dateutil" ,python-dateutil)
+       ("python-requests" ,python-requests)
+       ("python-lxml" ,python-lxml)
+       ("python-html5lib" ,python-html5lib)
+       ("python-pillow" ,python-pillow)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-readability" ,python-readability)
+       ("python-pygments" ,python-pygments)
+       ("python-listparser" ,python-listparser)
+       ("python" ,python)
+       ("mpv" ,mpv)
+       ("webkitgtk" ,webkitgtk)
+       ("libhandy" ,libhandy)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("hicolor-icon-theme" ,hicolor-icon-theme)))
+    (home-page "https://gfeeds.gabmus.org/")
+    (synopsis "Easy-to-use GTK+ RSS/Atom feed reader")
+    (description "An RSS/Atom feed reader made with GTK+ with an
+easy-to-use graphical user interface.")
+    (license license:gpl3+)))
-- 
2.30.1





Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 27 Feb 2021 22:43:02 GMT) Full text and rfc822 format available.

Message #14 received at 46823 <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: 46823 <at> debbugs.gnu.org
Subject: [PATCH 1/3] gnu: Add python-readability.
Date: Sat, 27 Feb 2021 23:42:53 +0100
[Message part 1 (text/plain, inline)]
Hello!

If I do not wrap XDG_DATA_DIRS, then in a --pure environment gfeeds
cannot find gsettings-desktop-schemas and wont start.

I also figured I'd depend on mpv and specify it's full path in the
config by default (instead of just the PATH's relative "mpv") since it
is useful for basic functionality of the software (rss on feeds
providing video links). Depending on the user's profile, the user is
still free to change it. Does that sound OK to you?

Appreciate the review,

Thanks!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Fri, 05 Mar 2021 16:33:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Léo Le Bouter via Guix-patches via <guix-patches <at> gnu.org>
Cc: Léo Le Bouter <lle-bout <at> zaclys.net>, 46823 <at> debbugs.gnu.org
Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.
Date: Fri, 05 Mar 2021 17:32:42 +0100
Hello,

Léo Le Bouter via Guix-patches via <guix-patches <at> gnu.org> writes:

> If I do not wrap XDG_DATA_DIRS, then in a --pure environment gfeeds
> cannot find gsettings-desktop-schemas and wont start.

It looks like a common deed across packages.

> I also figured I'd depend on mpv and specify it's full path in the
> config by default (instead of just the PATH's relative "mpv") since it
> is useful for basic functionality of the software (rss on feeds
> providing video links). Depending on the user's profile, the user is
> still free to change it. Does that sound OK to you?

It is better than propagating it anyway. I think that's fine.

Note that (native-)inputs should be sorted alphabetically, and
descriptions ought to be full sentences.

Otherwise, LGTM.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Fri, 05 Mar 2021 16:33:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Fri, 05 Mar 2021 23:20:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, Léo Le
 Bouter via Guix-patches via <guix-patches <at> gnu.org>
Cc: 46823-done <at> debbugs.gnu.org
Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.
Date: Sat, 06 Mar 2021 00:19:46 +0100
[Message part 1 (text/plain, inline)]
On Fri, 2021-03-05 at 17:32 +0100, Nicolas Goaziou wrote:

Thanks for the review!

> Note that (native-)inputs should be sorted alphabetically, and
> descriptions ought to be full sentences.

I did the descriptions but did not sort all *inputs because it is quite
troublesome to do so editing commit history etc.. I don't like doing it
manually and don't have any tooling, also don't think it is very
worthwhile use of my time, nor do I think it adds much value to GNU
Guix. If you have any tooling to suggest to do it easily in Emacs then
I'll happily do that in every of my contributions by default.

I also moved gfeeds to gnu/packages/syndication.scm as that's where it
sits better I think, it not being an official GNOME project.

Pushed all in 373e5fc96724fd38bb1263e4af90932ea36f596b.

Léo
[signature.asc (application/pgp-signature, inline)]

Reply sent to Léo Le Bouter <lle-bout <at> zaclys.net>:
You have taken responsibility. (Fri, 05 Mar 2021 23:20:02 GMT) Full text and rfc822 format available.

Notification sent to Léo Le Bouter <lle-bout <at> zaclys.net>:
bug acknowledged by developer. (Fri, 05 Mar 2021 23:20:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 06 Mar 2021 10:15:01 GMT) Full text and rfc822 format available.

Message #31 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Léo Le Bouter <lle-bout <at> zaclys.net>
Cc: 46823-done <at> debbugs.gnu.org,
 Léo Le Bouter via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.
Date: Sat, 06 Mar 2021 11:13:52 +0100
Hello,

Léo Le Bouter <lle-bout <at> zaclys.net> writes:

> On Fri, 2021-03-05 at 17:32 +0100, Nicolas Goaziou wrote:

>> Note that (native-)inputs should be sorted alphabetically, and
>> descriptions ought to be full sentences.
>
> I did the descriptions but did not sort all *inputs because it is quite
> troublesome to do so editing commit history etc.. I don't like doing it
> manually and don't have any tooling, also don't think it is very
> worthwhile use of my time, nor do I think it adds much value to GNU
> Guix.

I obviously cannot tell what is worth of your time. 

However, sorting inputs alphabetically has some value. For example, it
makes it easier to add more inputs later, as it becomes less tedious to
check for duplicates.

> If you have any tooling to suggest to do it easily in Emacs then
> I'll happily do that in every of my contributions by default.

What about a basic M-x sort-lines ? Note that you need to be cautious
about the first and last inputs, as opening and closing parens should be
sent to another line there.

If you don't want to special-casing first and last inputs, there's the
more "advanced"

  M-x sort-regexp-fields RET (".+?".*?) RET \& RET

while selecting the full input field (with C-M-SPC).

HTH,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 06 Mar 2021 10:15:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Sat, 06 Mar 2021 17:45:01 GMT) Full text and rfc822 format available.

Message #37 received at 46823-done <at> debbugs.gnu.org (full text, mbox):

From: Léo Le Bouter <lle-bout <at> zaclys.net>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 46823-done <at> debbugs.gnu.org
Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.
Date: Sat, 06 Mar 2021 18:44:39 +0100
[Message part 1 (text/plain, inline)]
On Sat, 2021-03-06 at 11:13 +0100, Nicolas Goaziou wrote:
> 
> I obviously cannot tell what is worth of your time. 

What do you mean?

> However, sorting inputs alphabetically has some value. For example,
> it
> makes it easier to add more inputs later, as it becomes less tedious
> to
> check for duplicates.

Agreed but seeing all that has to be done in GNU Guix.. we can
massively sort *-inputs another time can't we? Or if there's an
automated pre-commit hook or Emacs "guix-packageer-mode" someone can
make, I'll happily install it.

> What about a basic M-x sort-lines ? Note that you need to be cautious
> about the first and last inputs, as opening and closing parens should
> be
> sent to another line there.

That's what I was using and yes first and last lines makes it quite
annoying.

> If you don't want to special-casing first and last inputs, there's
> the
> more "advanced"
> 
>   M-x sort-regexp-fields RET (".+?".*?) RET \& RET
> 
> while selecting the full input field (with C-M-SPC).

Thank you that's really great, will use!

Léo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46823; Package guix-patches. (Mon, 08 Mar 2021 09:19:01 GMT) Full text and rfc822 format available.

Message #40 received at 46823-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Léo Le Bouter <lle-bout <at> zaclys.net>, Nicolas Goaziou
 <mail <at> nicolasgoaziou.fr>
Cc: 46823-done <at> debbugs.gnu.org
Subject: Re: [bug#46823] [PATCH 1/3] gnu: Add python-readability.
Date: Mon, 08 Mar 2021 10:16:21 +0100
Hi,

On Sat, 06 Mar 2021 at 18:44, Léo Le Bouter via Guix-patches via <guix-patches <at> gnu.org> wrote:
> On Sat, 2021-03-06 at 11:13 +0100, Nicolas Goaziou wrote:

>> However, sorting inputs alphabetically has some value. For example,
>> it
>> makes it easier to add more inputs later, as it becomes less tedious
>> to
>> check for duplicates.
>
> Agreed but seeing all that has to be done in GNU Guix.. we can
> massively sort *-inputs another time can't we? Or if there's an
> automated pre-commit hook or Emacs "guix-packageer-mode" someone can
> make, I'll happily install it.

I am not convinced tooling for sorting inputs is worth here.  I mean
sorting the inputs (if there are not) or keeping sorted the inputs list
is so quick and easy compared to other parts of the packaging that
sorting is more a discipline than a concrete issue, similarly as two
spaces for the description’s sentences.  IMHO.

However, “guix lint” could warn when the inputs are not sorted.

And it remembers me this bug report:

<http://issues.guix.gnu.org/issue/42289>


Cheers,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 Apr 2021 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.