Add build-system in pyproject.toml docs
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
I just started using poetry. I set it up for an existing project. So I did not run poetry new
, nor poetry init
, because I already had a pyproject.toml
and wasn’t sure if it was going to be overwritten (and also because I did not want to use the interactive setup).
So I wrote my pyproject.toml
by hand, by copying the example given in the README.
But I couldn’t find anywhere in the docs or the README what the build-system
should look like!
I finally found it in another issue: https://github.com/sdispater/poetry/issues/321.
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
It’s not like an option or else, it’s actually mandatory 🙂, so this should be added in the docs, and in the README.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
pyproject.toml - pip documentation v22.3.1
Introduced in PEP 518, the build-system.requires key in the pyproject.toml file is a list of requirement specifiers for build-time dependencies of a package ......
Read more >A Practical Guide to Setuptools and Pyproject.toml
An example driven guide to setting up and building a python package using Setuptools together with pyproject.toml.
Read more >The pyproject.toml file | Documentation | Poetry
When a script is added or updated, run poetry install to make them available in the project's virtualenv. extras #. Poetry supports extras...
Read more >A pyproject.toml Developer's Cheat Sheet | by Ricardo Mendes
Demonstrate how to use another build system than Setuptools. ... Flit's pyproject.toml documentation describes how to add optional ...
Read more >PEP 518 – Specifying Minimum Build System Requirements ...
As time went on, setuptools [2] gained popularity to add some features on top of ... A pyproject.toml file may be used to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I look for the documentation of the tag [build-system], I did not find anything but just found this thread and a reference to how this tag will be added automatically to the toml file when running poetry init.
The above gives me a sense of “This [build-system] thing is just a boilerplate and its content is not that important”. However that is not the case in this thread. The tag [build-system] is actually used to solve a problem, where I encountered another problem to it as well.
I know that there is already a documentation explaining what each section in the toml file is aiming for but I did not find one for [build-system]. Can you please reopen this request and add the documentation of [build-system]?
It is not user friendly as a user has to read through the entire PEP 517 just to know how to add that dependency. A summary of PEP 517 for most used cases will be appreciated. Those cases include building extensions, building extensions which require some build time packages to be installed first, etc. In my case, numpy and cython has to be installed in order to compile the c codes properly.
As far as I understand correctly, the immediate documentation in the link above focuses on replacing poetry with poetry.core. This clouds the user from knowing that it also includes how to work with non-Python extensions.
Another related topic is the
build
tool mentioned in #11. It will be great to see how it is going to be implemented, though I have some concern that implementing that may ended up having the same problem setup.py is facing.