Add support for pyproject.toml files when adding --editable projects …#7670
Add support for pyproject.toml files when adding --editable projects …#7670ughstudios wants to merge 8 commits intopython-poetry:mainfrom
Conversation
…that are on local disk. There is currently a problem where setup_reader.py can only read setup.cfg or setup.py files for adding local packages. This adds support for flitcore and other backends that are defined in pyproject.toml files
|
immediate thoughts
|
The codebase I work on is only 3.10, do you mind if I add a fallback to use tomlkit for versions <3.11? tomllib is only available in 3.11. |
…rojects that are on local disk." This reverts commit 5f229f0.
…out during testing.
from poetry.utils._compat import tomllib |
|
Is there a way to run these tests at my desk so I don't keep spamming you? NVM I guess I can just run each of them manually. |
|
I'm running through all of the tests in the test suite. Are any of the tests known to be broken? It seems like my change has broken like 10+ tests :( |
|
If you've figured out how to run the tests then you can very easily verify for yourself that they pass without your changes. On the plus side this probably points you in the right direction for figuring out where to add new tests. |
| else: | ||
| info = get_pep517_metadata(path) | ||
| except PackageInfoError: | ||
| info = cls.from_pyproject_toml(path) |
There was a problem hiding this comment.
IMO, instead of putting this here, we should probably create a from_project_static_files which tries from_pyproject_toml and then from_setup_files, and then replace all existing from_setup_files usages with from_project_static_files.
There was a problem hiding this comment.
I'll have to do this on Monday when I'm back at my desk. Are you one of the maintainers of poetry? It says "FFY00 approved these changes 3 days ago."
There is currently a problem where setup_reader.py can only read setup.cfg or setup.py files for adding local packages. This adds support for flitcore and other backends that are defined in pyproject.toml files
Resolves: #7669