You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-42Lines changed: 18 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,62 +91,38 @@ To update a release of a Python package, you'll typically go through the followi
91
91
git tag -a v0.1.1 -m "Release version 0.1.1"
92
92
git push --tags
93
93
```
94
+
95
+
## Build
94
96
95
-
6. Build the new distribution files for the package using your chosen build tool, typically the build package:
97
+
Build the new distribution files for the package using your chosen build tool, typically the build package:
98
+
Run the build module from the root of the project where the `pyproject.toml` file is located:
99
+
This command will generate distribution files in the newly created `dist/` directory within your project. You will find both a source archive (`.tar.gz`) and a wheel file (`.whl`).
96
100
```shell
97
-
python -m build
101
+
pip install build
102
+
python -m build --version 0.1.2
98
103
```
99
104
100
-
7. Upload the new distribution files to the Python Package Index (PyPI), typically using twine:
105
+
106
+
### Publish
107
+
After the build completes successfully, upload the new distribution files to the Python Package Index (PyPI).
108
+
Upload your package to PyPI using `twine`
101
109
```shell
102
110
twine upload dist/*
103
111
```
104
112
105
-
8. If your project is hosted on GitHub or a similar platform, you may also want to create a GitHub release:
106
-
- Go to the "Releases" section of your repository.
107
-
- Draft a new release, using the new tag you've created.
108
-
- Add release notes summarizing the changes.
109
-
- Optionally, attach binaries or additional files that accompany the release.
110
-
- Publish the release.
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
113
+
### Github Release
120
114
115
+
If your project is hosted on GitHub or a similar platform, you may also want to create a GitHub release:
116
+
- Go to the "Releases" section of your repository.
117
+
- Draft a new release, using the new tag you've created.
118
+
- Add release notes summarizing the changes.
119
+
- Optionally, attach binaries or additional files that accompany the release.
120
+
- Publish the release.
121
121
122
-
### Build
123
-
build your package, first ensure you have the latest versions of `build` and `wheel` installed:
124
-
125
-
```shell
126
-
pip install --upgrade build wheel
127
-
pip install --upgrade twine
128
-
```
129
-
130
-
### Install
131
-
Run the build module from the root of the project where the `pyproject.toml` file is located:
132
-
133
-
```shell
134
-
python -m build --version 0.0.2
135
-
```
136
-
This command will generate distribution files in the newly created `dist/` directory within your project. You will find both a source archive (`.tar.gz`) and a wheel file (`.whl`).
0 commit comments