From cf8f80f77cb7243dd8517052256c93654d5b002f Mon Sep 17 00:00:00 2001 From: GreedyC <62262441+GreedyC@users.noreply.github.com> Date: Thu, 22 Oct 2026 11:14:11 +0300 Subject: [PATCH] docs: use pip for pyproject-based source installation --- CONTRIBUTING.md | 11 ++++++++--- README.md | 2 +- docs/guide.md | 2 +- docs/index.md | 2 +- docs/installation.md | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5d67c96b..e380cac3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,9 +47,14 @@ In addition, the project follows a convention of: ## Testing Python Fire uses [GitHub Actions](https://github.com/google/python-fire/actions) to run tests on each pull request. You can run -these tests yourself as well. To do this, first install the test dependencies -listed in setup.py (e.g. pytest, mock, termcolor, and hypothesis). -Then run the tests by running `pytest` in the root directory of the repository. +these tests yourself as well. From the root directory of your source checkout, +install Python Fire and the test dependencies declared in `pyproject.toml`: + +```sh +python -m pip install -e ".[test]" +``` + +Then run the tests with `python -m pytest` in the same directory. ## Linting diff --git a/README.md b/README.md index 1482d56d1..a27e0c37e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ To install Python Fire with pip, run: `pip install fire` To install Python Fire with conda, run: `conda install fire -c conda-forge` To install Python Fire from source, first clone the repository and then run: -`python setup.py install` +`python -m pip install .` ## Basic Usage diff --git a/docs/guide.md b/docs/guide.md index 444a76ff8..eb59d2d6a 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -16,7 +16,7 @@ To install Python Fire from pypi, run: Alternatively, to install Python Fire from source, clone the source and run: -`python setup.py install` +`python -m pip install .` ### Hello World diff --git a/docs/index.md b/docs/index.md index 8dcc5db6d..f1c62e197 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,7 +22,7 @@ To install Python Fire with pip, run: `pip install fire` To install Python Fire with conda, run: `conda install fire -c conda-forge` To install Python Fire from source, first clone the repository and then run: -`python setup.py install` +`python -m pip install .` ## Basic Usage diff --git a/docs/installation.md b/docs/installation.md index 7e4cccb85..4eb1f1e0e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -5,4 +5,4 @@ To install Python Fire with pip, run: `pip install fire` To install Python Fire with conda, run: `conda install fire -c conda-forge` To install Python Fire from source, first clone the repository and then run -`python setup.py install`. To install from source for development, instead run `python setup.py develop`. +`python -m pip install .`. To install from source for development, instead run `python -m pip install -e .`.