From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/2] utils/scanpypi: ensure tmp_extract is cleaned up on exception
Date: Wed, 3 Aug 2022 23:38:56 +0200 [thread overview]
Message-ID: <20220803233856.3d609d8c@windsurf> (raw)
In-Reply-To: <20220313171355.271345-1-james.hilliard1@gmail.com>
On Sun, 13 Mar 2022 11:13:54 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:
> + s_file, s_path, s_desc = imp.find_module('setup', [self.tmp_extract])
> + imp.load_module('__main__', s_file, s_path, s_desc)
> + if self.metadata_name in self.setup_args:
> + pass
> + elif self.metadata_name.replace('_', '-') in self.setup_args:
> + self.metadata_name = self.metadata_name.replace('_', '-')
> + elif self.metadata_name.replace('-', '_') in self.setup_args:
> + self.metadata_name = self.metadata_name.replace('-', '_')
> + try:
> + self.setup_metadata = self.setup_args[self.metadata_name]
> + except KeyError:
> + # This means setup was not called
> + print('ERROR: Could not determine package metadata for {pkg}.\n'
> + .format(pkg=self.real_name))
> + raise
> + finally:
> + os.chdir(current_dir)
> + sys.path.remove(self.tmp_extract)
>
> def get_requirements(self, pkg_folder):
> """
Are you sure this work correctly?
If I understand correctly self.tmp_extract is where the Python package
source code is extracted. So if you remove it at the end of
load_setup(), how will your new load_pyproject() added in PATCH 2/2 be
able to use the package source code?
Also, why is this removal needed, as anyway the full tmp_path gets
removed at the end of the main() function?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-08-03 21:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-13 17:13 [Buildroot] [PATCH v2 1/2] utils/scanpypi: ensure tmp_extract is cleaned up on exception James Hilliard
2022-03-13 17:13 ` [Buildroot] [PATCH v2 2/2] utils/scanpypi: add flit package support James Hilliard
2022-08-03 21:46 ` Thomas Petazzoni via buildroot
2022-08-03 22:19 ` James Hilliard
2022-08-17 0:48 ` Marcus Hoffmann
2022-08-17 5:56 ` James Hilliard
2022-08-17 14:24 ` Marcus Hoffmann
2022-08-18 8:32 ` James Hilliard
2022-08-03 21:38 ` Thomas Petazzoni via buildroot [this message]
2022-08-03 22:02 ` [Buildroot] [PATCH v2 1/2] utils/scanpypi: ensure tmp_extract is cleaned up on exception James Hilliard
2022-08-04 7:59 ` Thomas Petazzoni via buildroot
2022-08-17 5:57 ` James Hilliard
2022-08-17 6:16 ` James Hilliard
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=20220803233856.3d609d8c@windsurf \
--to=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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