Re: [bitbake-devel] [PATCH 1/2] pyproject.toml: add setuptools to requires; fix project structure
Rob Woolley <[email protected]>
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <CAGAhMBw3AeCPhybRpGBz+z-vp3xs8wWzaUvkCWaPwWhHqpxCrA@mail.gmail.com> |
Hi Chris, Thanks for pointing this out! I think it was a mistake for me to include the project and build-system sections in pyproject.toml. I had it in there originally to try to improve the versioning, but we chose to implement it a different way. It is only needed if you intend to do packaging which is something we are trying not to do with bitbake itself. We have a separate pyproject.toml file for bitbake-setup, which we do want to package for convenience. If we remove those sections does that fix the problem you see with PyCharm? Regards, Rob On Wed, Aug 12, 2026 at 3:44 PM Chris Laplante via lists.openembedded.org <[email protected]> wrote: > From: Chris Laplante <[email protected]> > > setuptools is listed as the build backend but wasn't in 'requires'. > > We also need to tell setuptools to look for our modules in 'lib' since > otherwise > it chokes on our non-standard layout with: > > [stderr] > error: Multiple top-level packages discovered in a flat-layout: > ['lib', 'conf', 'vendor', 'contrib', 'classes']. > > With these changes, 'uv sync' works and IDEs such as PyCharm can > properly analyze the project. > > Signed-off-by: Chris Laplante <[email protected]> > --- > pyproject.toml | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/pyproject.toml b/pyproject.toml > index 93508d92e..886753f14 100644 > --- a/pyproject.toml > +++ b/pyproject.toml > @@ -1,10 +1,17 @@ > [build-system] > -requires = [] > +requires = ["setuptools>=64"] > build-backend = "setuptools.build_meta" > > [project] > name = "bitbake" > version = "2.19.0" > +requires-python = ">= 3.9" > + > +[tool.setuptools] > +package-dir = {"" = "lib"} > + > +[tool.setuptools.packages.find] > +where = ["lib"] > > [tool.vendoring] > destination = "lib/bb/_vendor" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#19919): > https://lists.openembedded.org/g/bitbake-devel/message/19919 > Mute This Topic: https://lists.openembedded.org/mt/120723537/556952 > Group Owner: [email protected] > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ > [email protected]] > -=-=-=-=-=-=-=-=-=-=-=- > >