Python pyproject.toml: Difference between revisions
From wikinotes
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<code>pyproject.toml</code> allows you to declare a build system,<br> | |||
and contain configuration to be passed to other tools related to your project.<br> | |||
(ex. before you needed to install setuptools, then could use <code>setup.py</code>) | |||
= Documentation = | = Documentation = | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| PEP- | | official docs || https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ | ||
|- | |||
| PEP-517 (execute build tools) || https://peps.python.org/pep-0517/ | |||
|- | |||
| PEP-518 (specify build tools) || https://peps.python.org/pep-0518/ | |||
|- | |- | ||
|} | |} | ||
Line 14: | Line 22: | ||
| pyproject.toml basics || https://godatadriven.com/blog/a-practical-guide-to-setuptools-and-pyproject-toml/ | | pyproject.toml basics || https://godatadriven.com/blog/a-practical-guide-to-setuptools-and-pyproject-toml/ | ||
|- | |- | ||
| what is pyproject.toml || https://snarky.ca/what-the-heck-is-pyproject-toml/ | |||
|} | |} | ||
</blockquote><!-- Tutorials --> | </blockquote><!-- Tutorials --> |
Latest revision as of 23:19, 14 February 2024
pyproject.toml
allows you to declare a build system,
and contain configuration to be passed to other tools related to your project.
(ex. before you needed to install setuptools, then could use setup.py
)
Documentation
official docs https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ PEP-517 (execute build tools) https://peps.python.org/pep-0517/ PEP-518 (specify build tools) https://peps.python.org/pep-0518/
Tutorials
pyproject.toml basics https://godatadriven.com/blog/a-practical-guide-to-setuptools-and-pyproject-toml/ what is pyproject.toml https://snarky.ca/what-the-heck-is-pyproject-toml/
Locations
${PROJECT}/pyproject.toml
project config
Syntax
Common Configs
unittest
pytest
# pyproject.toml [tool.pytest.ini_options] python_files = *.py testpaths = ["tests/unit", "tests/integration"] norecursedirs = tests/integration/resources