Pyproject.toml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 11: Line 11:
=Build Backend Configuration=
=Build Backend Configuration=
<code>pyproject.toml</code> tells the [[Python_Language_Modularization#Build_Frontend|build frontend]] tool which [[Python_Language_Modularization#Build_Backend|backend]] to use for the specific project it is part of.
<code>pyproject.toml</code> tells the [[Python_Language_Modularization#Build_Frontend|build frontend]] tool which [[Python_Language_Modularization#Build_Backend|backend]] to use for the specific project it is part of.
The <code>requires</code> key is a list of packages that are needed to build the package. The frontend should install them automatically when building the package. <font color=darkkhaki>What about the dependencies specified in <code>[[requirements.txt|requirements.txt]]</code>?</font>


<syntaxhighlight lang='toml'>
<syntaxhighlight lang='toml'>

Revision as of 02:15, 6 April 2024

External

Internal

Overview

pyproject.toml is a file that specifies required packages, scripts, plugins and URLs.

Build Backend Configuration

pyproject.toml tells the build frontend tool which backend to use for the specific project it is part of.

The requires key is a list of packages that are needed to build the package. The frontend should install them automatically when building the package. What about the dependencies specified in requirements.txt?

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

Project Metadata