diff mbox series

[bug#48091,v2,06/11] gnu: Add python-nltk@3.4.

Message ID 20210430113438.6379-6-rg@raghavgururajan.name
State Accepted
Headers show
Series [bug#48091,v2,01/11] gnu: Add python-colorful. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Raghav Gururajan April 30, 2021, 11:34 a.m. UTC
* gnu/packages/python-xyz.scm (python-nltk-3.4): New variable.
---
 gnu/packages/python-xyz.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

M April 30, 2021, 12:55 p.m. UTC | #1
Raghav Gururajan via Guix-patches via schreef op vr 30-04-2021 om 07:34 [-0400]:
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append "https://github.com/nltk/nltk/"
> +                       "archive/refs/tags/" version ".tar.gz"))
> +       (sha256
> +        (base32 "1d2cqbc1k6qgd27vfhgd3isn7wknqsgp50vx67m29zd6wgmxq9px"))))))

Is this an autogenerated tarball?  It seems to be.  Autogenerated tarballs
should be avoided for reproducibility (see <https://issues.guix.gnu.org/28659#2>);
GitHub sometimes changes the hashes of these tarballs.  Perhaps you could use
git-fetch instead?

I thought there was a linter checking for this, or maybe that's just wishful
thinking.

Greetings,
Maxime
Raghav Gururajan April 30, 2021, 1:15 p.m. UTC | #2
Hi Maxime<

> Is this an autogenerated tarball?  It seems to be.  Autogenerated tarballs
> should be avoided for reproducibility (see <https://issues.guix.gnu.org/28659#2>);
> GitHub sometimes changes the hashes of these tarballs.  Perhaps you could use
> git-fetch instead?

Ah, I was not aware of that (https://issues.guix.gnu.org/28659#2), thanks.

I have used git-fetch in v3.

Regards,
RG.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7e8f0c911c..16f2055339 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15061,6 +15061,21 @@  for classification, tokenization, stemming, tagging, parsing, and semantic
 reasoning, wrappers for natural language processing libraries.")
     (license license:asl2.0)))
 
+;; Versions >=3.5 breaks backward-compatibility,
+;; so we keep version 3.4.x around for a while.
+(define-public python-nltk-3.4
+  (package
+    (inherit python-nltk)
+    (version "3.4.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://github.com/nltk/nltk/"
+                       "archive/refs/tags/" version ".tar.gz"))
+       (sha256
+        (base32 "1d2cqbc1k6qgd27vfhgd3isn7wknqsgp50vx67m29zd6wgmxq9px"))))))
+
 (define-public python2-nltk
   (package-with-python2 python-nltk))