From d032eea46593cf873bd054b69326aab220bf6019 Mon Sep 17 00:00:00 2001 From: Thea Flowers Date: Fri, 25 Jan 2019 10:50:13 -0800 Subject: [PATCH] Add --no-deps to the packaging tutorial and a note explaining its usage. --- source/tutorials/packaging-projects.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index a207aeefe..bac669df2 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -277,7 +277,7 @@ detailed instructions) and install your package from TestPyPI: .. code-block:: bash - python3 -m pip install --index-url https://test.pypi.org/simple/ example-pkg-your-username + python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-pkg-your-username Make sure to specify your username in the package name! @@ -291,6 +291,8 @@ something like this: Installing collected packages: example-pkg-your-username Successfully installed example-pkg-your-username-0.0.1 +.. 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. + You can test that it was installed correctly by importing the module and referencing the ``name`` property you put in :file:`__init__.py` earlier.