Skip to content

Commit 3f7cbf7

Browse files
theacodesncoghlan
authored andcommitted
Add --no-deps to the packaging tutorial and a note explaining its usage. (#593)
1 parent 33a1782 commit 3f7cbf7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

source/tutorials/packaging-projects.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ detailed instructions) and install your package from TestPyPI:
277277

278278
.. code-block:: bash
279279
280-
python3 -m pip install --index-url https://test.pypi.org/simple/ example-pkg-your-username
280+
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-pkg-your-username
281281
282282
Make sure to specify your username in the package name!
283283

@@ -291,6 +291,8 @@ something like this:
291291
Installing collected packages: example-pkg-your-username
292292
Successfully installed example-pkg-your-username-0.0.1
293293
294+
.. note:: This example uses ``--index-url`` flag to specify TestPyPI instead of live PyPI. Additionally, it specifies ``--no-deps``. Since TestPyPI doesn't have the same packages as the live PyPI, it's possible that attempting to install dependencies may fail or install something unexpected. While our example package doesn't have any dependencies, it's a good practice to avoid installing dependencies when using TestPyPI.
295+
294296
You can test that it was installed correctly by importing the module and
295297
referencing the ``name`` property you put in :file:`__init__.py` earlier.
296298

0 commit comments

Comments
 (0)