diff mbox series

[bug#55580] gnu: Add python-langcodes

Message ID 87leutflf9.fsf@gmail.com
State Accepted
Headers show
Series [bug#55580] gnu: Add python-langcodes | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Artyom V. Poptsov May 22, 2022, 6:54 p.m. UTC
Hello,

this patch adds "langcodes" Python module[1] under the name
"python-langcodes".

References:
1. "A Python library for working with and comparing language codes."
   https://github.com/rspeer/langcodes

Comments

Mathieu Othacehe June 5, 2022, 7 p.m. UTC | #1
Hello Artyom,

> +    (inputs (list python))

This line is implicit, you can remove it.

> +    (home-page "https://github.com/explosion/catalogue")

Is that the correct home-page?

> +     "A Python library for working with and comparing language
> +codes.

You can merge those lines.

> +
> +\"langcodes\" implements @url{http://tools.ietf.org/html/bcp47, BCP 47}, the

@code{python-langcodes} implements...

> +langcodes can also refer to a database of language properties and names, built

@code{python-langcodes} can also...

> +from Unicode CLDR and the IANA subtag registry, if you install
> +@code{language_data}.")

That could be @code{python-language-data} is the package is created, I
guess :)

Could you please send an updated version?

Thanks,

Mathieu
diff mbox series

Patch

From 4a55bea39a617c64f354170777db4ba420045459 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 22 May 2022 21:50:37 +0300
Subject: [PATCH] gnu: Add python-langcodes

* gnu/packages/python-xyz.scm (python-langcodes): New variable.
---
 gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3c4fa16d16..95099feb04 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31449,3 +31449,34 @@  written in C.")
     (synopsis "Cython bindings for MurmurHash2")
     (description "This package provides Cython bindings for MurmurHash2.")
     (license license:expat)))
+
+(define-public python-langcodes
+  (package
+    (name "python-langcodes")
+    (version "3.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "langcodes" version))
+              (sha256
+               (base32
+                "1xkyh3qdcigb18qiimbwl2669y22hhdmd89mqcd270c7lbahfkbr"))))
+    (build-system python-build-system)
+    (native-inputs (list python-pytest))
+    (inputs (list python))
+    (home-page "https://github.com/explosion/catalogue")
+    (synopsis "Python library for working with language codes")
+    (description
+     "A Python library for working with and comparing language
+codes.
+
+\"langcodes\" implements @url{http://tools.ietf.org/html/bcp47, BCP 47}, the
+IETF Best Current Practices on Tags for Identifying Languages.  BCP 47 is also
+known as RFC 5646.  It subsumes ISO 639 and is backward compatible with it, and
+it also implements recommendations from the @url{http://cldr.unicode.org/,
+Unicode CLDR}.
+
+langcodes can also refer to a database of language properties and names, built
+from Unicode CLDR and the IANA subtag registry, if you install
+@code{language_data}.")
+    (license license:expat)))
+
-- 
2.25.1