File tree Expand file tree Collapse file tree 3 files changed +20
-32
lines changed
packaging-example-project Expand file tree Collapse file tree 3 files changed +20
-32
lines changed Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" setuptools>=61.0" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [project ]
6+ name = " calculator-myname"
7+ description = " A small example package"
8+ version = " 0.1.0"
9+ readme = " README.md"
10+ authors = [
11+ {
name =
" Firstname Lastname" ,
email =
" [email protected] " }
12+ ]
13+ dependencies = [
14+ " scipy"
15+ ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ To make our example package pip-installable we need to add one more file:
101101 │ └── subtracting.py
102102 ├── LICENSE
103103 ├── README.md
104- └── setup.py
104+ └── pyproject.toml
105105
106- This is how ``setup.py `` looks:
106+ This is how ``pyproject.toml `` looks:
107107
108- .. literalinclude :: packaging-example-project/setup.py
109- :caption: setup.py
108+ .. literalinclude :: packaging-example-project/pyproject.toml
109+ :caption: pyproject.toml
110110 :emphasize-lines: 18-20
111111
112112Note how our package requires ``scipy `` and we decided to not pin the version
@@ -154,7 +154,7 @@ We need two more things:
154154
155155Let's try it out. First we create the distribution package::
156156
157- $ python setup.py sdist
157+ $ python3 -m build
158158
159159We need twine::
160160
You can’t perform that action at this time.
0 commit comments