unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: jgart via Guix-patches via <guix-patches@gnu.org>
To: 62077@debbugs.gnu.org
Cc: lars@6xq.net, jgart <jgart@dismail.de>,
	Adam Faiz <adam.faiz@disroot.org>
Subject: [bug#62077] [PATCH v2] gnu: Add python-slugid.
Date: Fri, 31 Mar 2023 13:19:29 -0500	[thread overview]
Message-ID: <20230331181928.6626-1-jgart@dismail.de> (raw)
In-Reply-To: <82177a4f-a75d-a15d-117b-6f06a9adcb33@disroot.org>

* 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(+)

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





  parent reply	other threads:[~2023-03-31 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 16:46 [bug#62077] [PATCH] gnu: Add python-slugid Adam Faiz via Guix-patches via
2023-03-09 18:03 ` jgart via Guix-patches via
2023-03-31 18:19 ` jgart via Guix-patches via [this message]
2023-05-19  6:03 ` [bug#62077] [PATCH v2] " jgart via Guix-patches via
2023-05-19  6:04 ` [bug#62077] jgart via Guix-patches via
2023-05-19  6:15 ` [bug#62077] jgart via Guix-patches via
2023-05-19  6:27 ` [bug#62077] jgart via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331181928.6626-1-jgart@dismail.de \
    --to=guix-patches@gnu.org \
    --cc=62077@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).