Skip to content

Commit ddcfdfa

Browse files
committed
Add remark about install command
1 parent 1b694ed commit ddcfdfa

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/deprecated/commands.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ You could also run commands in other circumstances:
2424
That is, you can simply list the normal setup commands and options following the quoted part.
2525

2626
.. warning::
27-
On recent versions of ``setuptools`` running commands via ``python setup.py``
28-
is considered **deprecated** (and should be avoided).
27+
While it is perfectly fine that users write ``setup.py`` files to configure
28+
a package build (e.g. to specify binary extensions or customize commands),
29+
on recent versions of ``setuptools``, running ``python setup.py`` directly
30+
as a script is considered **deprecated**. This also means that users should
31+
avoid running commands directly via ``python setup.py <command>``.
2932

3033
If you want to create :term:`sdist <Source Distribution (or "sdist")>` or :term:`wheel`
3134
distributions the recommendation is to use the command line tool provided by :pypi:`build`::
@@ -41,6 +44,16 @@ That is, you can simply list the normal setup commands and options following the
4144
``setuptools``, by setting the :doc:`build requirements in pyproject.toml
4245
</build_meta>`.
4346

47+
If you want to install a package, you can use :pypi:`pip` or :pypi:`installer`::
48+
49+
pip install /path/to/wheel/file.whl
50+
pip install /path/to/sdist/file.tar.gz
51+
pip install . # replacement for python setup.py install
52+
pip install --editable . # replacement for python setup.py develop
53+
54+
pip install installer # nees to be installed first
55+
python -m installer /path/to/wheel/file.whl
56+
4457
-----------------
4558
Command Reference
4659
-----------------

0 commit comments

Comments
 (0)