[PATCH] gnu: Add python-slugid.

  • Done
  • quality assurance status badge
Details
2 participants
  • Adam Faiz
  • jgart
Owner
unassigned
Submitted by
Adam Faiz
Severity
normal
A
A
Adam Faiz wrote on 9 Mar 2023 17:46
(address . guix-patches@gnu.org)
82177a4f-a75d-a15d-117b-6f06a9adcb33@disroot.org
From f788ce8ebc205a6e05bcc270865d793d94bf51e9 Mon Sep 17 00:00:00 2001
Message-Id: <f788ce8ebc205a6e05bcc270865d793d94bf51e9.1678379861.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Thu, 9 Mar 2023 21:39:13 +0800
Subject: [PATCH] gnu: Add python-slugid.

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

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 83f3ec02ea..4bacd86432 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1096,6 +1096,23 @@ (define-public python-slixmpp
(home-page "https://lab.louiz.org/poezio/slixmpp")
(license license:expat)))
+(define-public python-slugid
+ (package
+ (name "python-slugid")
+ (version "2.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "slugid" version))
+ (sha256
+ (base32
+ "15x2kgzi38b023brfyng0y907am2qi1jgifnsjyph4b9fa5xjl59"))))
+ (build-system python-build-system)
+ (home-page "http://taskcluster.github.io/slugid.py/")
+ (synopsis "Module for Base64 encoded UUID v4 slugs")
+ (description "Slugid.py is a module for generating v4 UUIDs and
+encoding them into 22 character URL-safe base64 slug representation.")
+ (license license:mpl2.0)))
+
(define-public python-tenacity
(package
(name "python-tenacity")

base-commit: 5befcff66edb4d72ab8e713c81836fb8519ce3e6
--
2.39.2
J
J
jgart wrote on 9 Mar 2023 19:03
(address . lars@6xq.net)
dfec3eaa536ca96f019c2363d2ce7dcf@dismail.de
Hi,

I'll test this out from my end today and report back. Thanks for the patch!

all best,

jgart
J
[PATCH v2] gnu: Add python-slugid.
(address . 62077@debbugs.gnu.org)
20230331181928.6626-1-jgart@dismail.de
* gnu/packages/python-xyz.scm (python-slugid): New variable.

Co-authored-by: jgart <jgart@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(+)

Toggle diff (43 lines)
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
J
69400541463b827e7793ff31e4d2644e@dismail.de
Hi Adam,

I merged v2. Thanks for your contribution to GNU Guix.

all best,

jgart
J
(address . 62077@debbugs.gnu.org)
dfb3a94cbf2565f178a2e80213607330@dismail.de
done
J
(address . 62077@debbugs.gnu.org)
a8f2ea9b1b94cfc8f6c26edae6b0d70b@dismail.de
close 62077
J
(address . 62077@debbugs.gnu.org)
e73968d9ee38b4fc74a7972e021c3030@dismail.de
"close 62077"
J
(address . control@debbugs.gnu.org)
5a2f066b0d48fb28cabd2fb90588a62e@dismail.de
close 62077
quit
?