From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Python package naming: Dots vs hyphens Date: Mon, 11 Nov 2019 11:24:40 +0100 Message-ID: <20191111102440.hb63wsoe5mzeifuv@pelzflorian.localdomain> References: <20191106064955.rks6qsypuym6v6pt@pelzflorian.localdomain> <20191110105722.GB30909@jurong> <20191111093021.GG3954@E5400> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48316) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU6sG-0003hg-MY for guix-devel@gnu.org; Mon, 11 Nov 2019 05:24:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iU6sF-0002v9-Ic for guix-devel@gnu.org; Mon, 11 Nov 2019 05:24:44 -0500 Received: from pelzflorian.de ([5.45.111.108]:37732 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iU6sF-0002uk-3P for guix-devel@gnu.org; Mon, 11 Nov 2019 05:24:43 -0500 Content-Disposition: inline In-Reply-To: <20191111093021.GG3954@E5400> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org 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