-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoml.html
More file actions
50 lines (41 loc) · 1.68 KB
/
Copy pathtoml.html
File metadata and controls
50 lines (41 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>pyproject.toml</title>
</head>
<body>
<!-- Navigation Bar -->
<div class="sidebar" id="nav-placeholder"></div>
<div class="main-content">
<h1>pyproject.toml</h1>
<ul>
<li>Configuration file used by packaging tools</li>
<li><b>Sections</b>, also called tables are represented using square brackets [section name]</li>
<li>At least 3 sections are required (or recommended) -> [build-system], [project], [tool]</li>
<li><a href="https://packaging.python.org/en/latest/guides/writing-pyproject-toml/" target="blank">Python Packaging User Guide</a></li>
<li><a href="https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html" target="blank">Setuptools User Guide</a></li>
</ul>
<h3>Code example</h3>
<pre>
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "snakesay"
version = "1.0.0"
[project.scripts]
snake = "snakesay.__main__:main"
</pre>
<h3>Package file structure</h3>
<img src="images/python-pkg-file-structure.png" alt="Logo" class="pkgimg">
<br><br><br><br>
<a href="https://toml.io/en/"><img src="images/tomllogo.png" alt="Logo" class="tomllogo"></a>
</div>
<!-- JavaScript for loading the navigation -->
<script src="script.js"></script>
</body>
</html>