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: tutorials/publish-pypi.md
+16-18Lines changed: 16 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -155,8 +155,8 @@ Behind the scenes when hatch creates a new virtual environment,
155
155
by default it uses venv[^venv].
156
156
157
157
hatch will:
158
-
1.Creates a new virtualenv (venv). That is located on your computer. You can customize the location of this environment if you wish ....<where??>
159
-
2.Installs your package into the environment in editable mode (similar to `pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
158
+
1.Create a new virtualenv (venv) that is located on your computer. You can customize the location of this environment if you wish ....<where??>
159
+
2.Install your package into the environment in editable mode (similar to `pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
160
160
161
161
## Step 2: Build your package's sdist and wheel distributions
You've now built your Python package and created your package distribution files. The next step is to setup
205
205
your account on PyPI so you can publish your package.
206
206
207
-
## Step 3. Setup your testPyPI account
207
+
## Step 3. Setup your test PyPI account
208
208
209
-
Next, you'll setup an account on `testPyPI`. Remember that you
210
-
are using testPyPI here instead of the real PyPI as a way to
209
+
Next, you'll setup an account on test PyPI. Remember that you
210
+
are using test PyPI here instead of the real PyPI as a way to
211
211
safely learn how to publish a package without stressing the
212
212
real PyPI's servers.
213
213
214
214
:::{admonition} Test vs. real PyPI
215
-
If you have a package that you are confident belongs on the real PyPI. All of the steps below will also work for you with slight modifications which will be noted below.
215
+
If you have a package that you are confident belongs on the real PyPI, all of the steps below will also work for you if you replace test.pypi.org with pypi.org wherever it appears.
216
216
:::
217
217
218
218
1.[Open up a web browser and go to the test PyPI website](https://test.pypi.org/).
@@ -230,10 +230,10 @@ Show them how to do this
230
230
:::
231
231
232
232
:::{figure-md} build-workflow-tutorial
233
-
<imgsrc="../images/tutorials/testpypi-search.png"alt="This is a screenshot of the test PyPI website. At the top in the search bar, you can see the search for pyosPackage. The search return says there were no results for pyosPackage Did you mean probpackage"width="700px">
233
+
<imgsrc="../images/tutorials/testpypi-search.png"alt="This is a screenshot of the test PyPI website. At the top in the search bar, you can see the search for pyosPackage. The search return says there were no results for pyosPackage Did you mean probpackage"width="700px">
234
234
235
-
Before you try to upload to (test) PyPI, check to see if the name of your package is already taken. You can do that using
236
-
the search box at the top of the (test) PyPI website.
235
+
Before you try to upload to test PyPI, check to see if the name of your package is already taken. You can do that using
236
+
the search box at the top of the test PyPI website.
237
237
:::
238
238
239
239
@@ -262,7 +262,7 @@ It's ideal to create a package-specific token. When you create an account wide t
262
262
263
263
### Follow the steps below to create your token.
264
264
265
-
* Login to testPyPI and go to your account settings
265
+
* Login to test PyPI and go to your account settings
266
266
* Scroll down to the **API tokens** section
267
267
* Click on the **Add API Token** button
268
268
* If you are new to using PyPI and don't have any packages there yet, OR if you have other packages on PyPI but are uploading a new package, you will need to create an account-wide token.
@@ -276,8 +276,6 @@ It's ideal to create a package-specific token. When you create an account wide t
276
276
Once you have the token in a safe place, you are ready to publish to
277
277
PyPI.
278
278
279
-
1. Set your username to `__token__`
280
-
1. Set your password to the token value, including the `pypi-` prefix
If your credentials are value, Hatch will publish your package to test-PyPI.
300
+
If your credentials are valid, Hatch will publish your package to testPyPI.
303
301
304
302
Hatch also has a caching system so once you enter your credentials it will remember them.
305
303
306
-
## Install your package from TestPyPI
304
+
## Install your package from test PyPI
307
305
308
306
Once your package upload is complete, you can install it from
309
-
testPYPI. You can find the installation instructions on the testPyPI
307
+
test PYPI. You can find the installation instructions on the test PyPI
310
308
landing page for your newly uploaded package.
311
309
312
310
:::{figure-md} testpypi-landing-page
313
-
<imgsrc="../images/tutorials/test-pypi-package.png"alt="A screenshot of the testPyPI page for pyosPackage. It says pyosPackage 0.1.0 at the top with the pip install instructions below. The landing page of the package has information from the package's readme file. "width="700px">
311
+
<imgsrc="../images/tutorials/test-pypi-package.png"alt="A screenshot of the test PyPI page for pyosPackage. It says pyosPackage 0.1.0 at the top with the pip install instructions below. The landing page of the package has information from the package's readme file. "width="700px">
314
312
315
-
This is an example landing page for the pyosPackage that was just uploaded. Notice at the top of the page there is instructions for how to install the package from test PyPI. You can simply copy that code and use it to install your package from testPyPi locally.
313
+
This is an example landing page for the pyosPackage that was just uploaded. Notice at the top of the page there is instruction for how to install the package from test PyPI. You can simply copy that code and use it to install your package from testPyPi locally.
316
314
:::
317
315
318
316
319
-
As an example, [check out our pyOpenSci pyosPackage landing page on testPyPI](https://test.pypi.org/project/pyosPackage/). Notice the page has information about the current package version and also installation instructions as follows:
317
+
As an example, [check out our pyOpenSci pyosPackage landing page on test PyPI](https://test.pypi.org/project/pyosPackage/). Notice the page has information about the current package version and also installation instructions as follows:
0 commit comments