all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org
Subject: Re: Python package naming: Dots vs hyphens
Date: Mon, 11 Nov 2019 11:24:40 +0100	[thread overview]
Message-ID: <20191111102440.hb63wsoe5mzeifuv@pelzflorian.localdomain> (raw)
In-Reply-To: <20191111093021.GG3954@E5400>

On Mon, Nov 11, 2019 at 11:30:21AM +0200, Efraim Flashner wrote:
> I think hyphens is the way to go here.
> 

I search for [!#%&'()*,./:;?@_{}] in the output of

florian@florianmflorian@florianmacbook ~/git/guix-artwork/website$ GUILE_LOAD_PATH=.:$GUILE_LOAD_PATH guile -c '(write (map (@ (guix packages) package-name) ((@ (apps packages data) all-packages))))'

and see a few packages with periods, including but not limited to
python packages.

Perhaps a change to importers like this would be appropriate, would it
not?

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 4694b6e7ef..6fecf929ec 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -205,9 +205,9 @@ to in the (guix licenses) module, or #f if there is no such known license."
   (assoc-ref licenses license))
 
 (define (snake-case str)
-  "Return a downcased version of the string STR where underscores are replaced
+  "Return a downcased version of the string STR where punctuation is replaced
 with dashes."
-  (string-join (string-split (string-downcase str) #\_) "-"))
+  (string-join (string-split (string-downcase str) char-set:punctuation) "-"))
 
 (define (beautify-description description)
   "Improve the package DESCRIPTION by turning a beginning sentence fragment




(Plus documentation in doc/guix.texi.)

Regards,
Florian

      reply	other threads:[~2019-11-11 10:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  6:49 Python package naming: Dots vs hyphens pelzflorian (Florian Pelz)
2019-11-06  7:19 ` Efraim Flashner
2019-11-06 13:13   ` pelzflorian (Florian Pelz)
2019-11-07  7:34     ` Efraim Flashner
2019-11-06 13:18   ` Mailman packaging (was: Re: Python package naming: Dots vs hyphens) pelzflorian (Florian Pelz)
2019-11-13 22:16     ` pelzflorian (Florian Pelz)
2019-11-18 10:13     ` Efraim Flashner
2019-11-18 13:14       ` pelzflorian (Florian Pelz)
2019-11-20 16:36       ` Pjotr Prins
2021-09-29 16:34       ` Christine Lemmer-Webber
2021-09-30  7:54         ` pelzflorian (Florian Pelz)
2019-11-06 13:53   ` Python package naming: Dots vs hyphens Tobias Geerinckx-Rice
2019-11-10 10:57 ` Andreas Enge
2019-11-11  9:30   ` Efraim Flashner
2019-11-11 10:24     ` pelzflorian (Florian Pelz) [this message]

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

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

  git send-email \
    --in-reply-to=20191111102440.hb63wsoe5mzeifuv@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.