From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: erichiggins@gmail.com
Cc: James Hilliard <james.hilliard1@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] utils/scanpypi: supply package name to setup() when not provided
Date: Mon, 12 Sep 2022 22:34:46 +0200 [thread overview]
Message-ID: <20220912203446.GB1082494@scaer> (raw)
In-Reply-To: <CAHfxMJ4cFRmUBteM-tM_gM=5fbdupjJRaahnbc34wifYgSn=gg@mail.gmail.com>
Eric, All,
+James for his expertise in that file
On 2022-09-12 09:28 -0700, erichiggins@gmail.com spake thusly:
> Signed-off-by: Eric Higgins <erichiggins@gmail.com>
Thanks for this patch.
However, this will need a bit more explanations in the commit log. Start
by describing the issue, explain why that happens, and how it is fixed.
You can get an idea of how to structure that by looking at existing
commit logs: git log utils/scanpypi
> ---
> utils/scanpypi | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/utils/scanpypi b/utils/scanpypi
> index 452b4a3fc3..a5522a879e 100755
> --- a/utils/scanpypi
> +++ b/utils/scanpypi
> @@ -58,8 +58,9 @@ def setup_decorator(func, method):
> def closure(*args, **kwargs):
> # Any python packages calls its setup function to be installed.
> # Argument 'name' of this setup function is the package's name
So, this comment states that setup() is called with 'name' argument, but
what your commit title implies is that it is not always true. So, this
comment is now incorrect, and must be amended apropriately.
Could it be that sometimes, 'name' is a keyword argument, and in some
other case, it is just a positional argument?
> - BuildrootPackage.setup_args[kwargs['name']] = kwargs
> - BuildrootPackage.setup_args[kwargs['name']]['method'] = method
> + name = kwargs.get('name', BuildrootPackage.setup_args['name'])
> + BuildrootPackage.setup_args[name] = kwargs
> + BuildrootPackage.setup_args[name]['method'] = method
> return closure
>
> # monkey patch
> @@ -147,6 +148,7 @@ class BuildrootPackage():
> self.url = None
> self.version = None
> self.license_files = []
> + self.setup_args['name'] = self.real_name
Otherwise, I do understand what the code does, and I think this is the
correct solution. James, your opinion?.
Still, what is missing is an explanation on why this change is needed.
Regards,
Yann E. MORIN.
> def fetch_package_info(self):
> """
> --
> 2.25.1
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-09-12 20:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 16:28 [Buildroot] [PATCH 1/1] utils/scanpypi: supply package name to setup() when not provided erichiggins
2022-09-12 20:34 ` Yann E. MORIN [this message]
2022-09-12 21:05 ` Marcus Hoffmann
2022-09-12 21:34 ` erichiggins
2022-09-18 16:00 ` Yann E. MORIN
2022-09-18 19:32 ` erichiggins
-- strict thread matches above, loose matches on Subject: below --
2022-09-18 19:48 erichiggins
2023-08-26 21:39 ` Thomas Petazzoni via buildroot
2023-08-27 7:03 ` James Hilliard
2023-08-27 21:28 ` erichiggins
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=20220912203446.GB1082494@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=erichiggins@gmail.com \
--cc=james.hilliard1@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox