From: "Ludovic Courtès" <ludo@gnu.org>
To: Vivien Kraus <vivien@planete-kraus.eu>
Cc: 53395@debbugs.gnu.org
Subject: [bug#53395] Fix pypi import for flake8-array-spacing
Date: Mon, 24 Jan 2022 15:05:47 +0100 [thread overview]
Message-ID: <87ee4xut38.fsf@gnu.org> (raw)
In-Reply-To: <87czkmi434.fsf@planete-kraus.eu> (Vivien Kraus's message of "Thu, 20 Jan 2022 20:45:19 +0100")
Hello!
Vivien Kraus <vivien@planete-kraus.eu> skribis:
> From d8923c394fbe2e8eedf6fa548455d398f0caa022 Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien@planete-kraus.eu>
> Date: Thu, 20 Jan 2022 20:11:56 +0100
> Subject: [PATCH] pypi importer: Convert - to _ in pypi urls if needed.
>
> * guix/import/pypi.scm (find-project-url): New function.
> (make-pypi-sexp): Use find-project-url.
[...]
> +(define (find-project-url name pypi-url)
> + "Try different project name substitution until the result is found in
> +pypi-url. Downcase is required for \"Deprecated\" and \"uWSGI\", and
> +underscores are required for flake8-array-spacing."
> + (or (find (cut string-contains pypi-url <>)
> + (list name
> + (string-downcase name)
> + (string-replace-substring name "-" "_")))
> + (begin
> + (warning (G_ "The project name `~a' does not appear in the pypi URL; you might need to fix the pypi-url declaration in the generated package. The URL is: ~a~%")
> + name pypi-url)
> + name)))
As a rule of thumb, warnings are one-line messages (not sentences)
describing the problem. Here you could emit such a warning, followed by
a call to ‘display-hint’, which accepts Texinfo markup.
Could you adjust accordingly?
Also, what about adding a unit test?
Thanks,
Ludo’.
next prev parent reply other threads:[~2022-01-24 14:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 19:45 [bug#53395] Fix pypi import for flake8-array-spacing Vivien Kraus via Guix-patches via
2022-01-24 14:05 ` Ludovic Courtès [this message]
2022-01-24 22:07 ` Vivien Kraus via Guix-patches via
2022-01-25 13:19 ` Ludovic Courtès
2022-01-25 16:39 ` Vivien Kraus via Guix-patches via
2022-01-26 15:20 ` bug#53395: " Ludovic Courtès
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=87ee4xut38.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=53395@debbugs.gnu.org \
--cc=vivien@planete-kraus.eu \
/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.