GNU bug report logs - #62077
[PATCH] gnu: Add python-slugid.

Previous Next

Package: guix-patches;

Reported by: Adam Faiz <adam.faiz <at> disroot.org>

Date: Thu, 9 Mar 2023 16:47:01 UTC

Severity: normal

Tags: patch

Done: "jgart" <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: jgart <jgart <at> dismail.de>
To: 62077 <at> debbugs.gnu.org
Cc: lars <at> 6xq.net, jgart <jgart <at> dismail.de>, Adam Faiz <adam.faiz <at> disroot.org>
Subject: [bug#62077] [PATCH v2] gnu: Add python-slugid.
Date: Fri, 31 Mar 2023 13:19:29 -0500
* gnu/packages/python-xyz.scm (python-slugid): New variable.

Co-authored-by: jgart <jgart <at> dismail.de>
---

Hi Adam,

Thanks for the patch and sorry for the delay in reviewing this. I've
been busy. I've attached a version 2 of your patch with modifications.
I've also added myself as a "co-author" since I've made a few changes
to your patch.

I modified the package to take the source from GitHub since the GitHub
repository includes the tests and the PyPi version does not. We usually
try to enable the tests on all of our packages when available and
practical. I added a phase in the arguments <package> field implementing
that.

I also added a comment mentioning that tests are run by nose via tox. In
my approach here I just run nose directly and forego using tox.

Hi Lars, 

WDYT. Can this be merged? I don't have commit access so someone
else would have to merge it.

all best,

jgart

 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ca6c68ec7c..5c44817afa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16801,6 +16801,36 @@ (define-public python-rarfile
 is made as zipfile like as possible.")
     (license license:isc)))
 
+(define-public python-slugid
+  (package
+    (name "python-slugid")
+    (version "2.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/taskcluster/slugid.py")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "1h64p2jlqv6lsmw8h2j203kx3bhv72cwzpk5gdhsaamw30cp3h1i"))))
+    (build-system python-build-system)
+    (native-inputs (list python-nose))
+    (arguments
+      (list #:phases
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key inputs tests? #:allow-other-keys)
+                (when tests?
+                  ;; The project uses tox to run the tests via nose.
+                  (invoke "nosetests" "-v" "test.py")))))))
+    (home-page "http://taskcluster.github.io/slugid.py")
+    (synopsis "Module for Base64 encoded UUID v4 slugs")
+    (description "This package provides a module for generating v4
+UUIDs and encoding them into 22 character URL-safe base64 slug
+representation.")
+    (license license:mpl2.0)))
+
 (define-public python-rich
   (package
     (name "python-rich")
-- 
2.39.2





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

Previous Next


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