[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python package naming: Dots vs hyphens
From: |
pelzflorian (Florian Pelz) |
Subject: |
Re: Python package naming: Dots vs hyphens |
Date: |
Mon, 11 Nov 2019 11:24:40 +0100 |
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
Re: Python package naming: Dots vs hyphens, Andreas Enge, 2019/11/10