RE: [bitbake-devel] [PATCH 1/2] pyproject.toml: add setuptools to requires; fix project structure
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <DM8PR12MB54309AA576EBC6F6EF5051BA8BDA2@DM8PR12MB5430.namprd12.prod.outlook.com> |
Hi Rob, > 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? I gave it a try and getting rid of the 'build-system' section makes 'uv sync' work and PyCharm load the project. (I think we need to keep the 'project' section though.) With the 'build-system' stuff and 'tool.setuptools' gone though, PyCharm is back to not being able to resolve 'import bb' imports. In my case, a .env file containing: PYTHONPATH=lib did the trick. But that isn't something that should be committed to git. Ideally, we would be able to add barebones tool-specific config files to bitbake so IDEs can analyze it. e.g. .vscode/settings.json for VSCode or .idea/modules.xml for PyCharm. I'll work on a new set of patches for this. Thanks, Chris