1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #7077 from pradyunsg/nicer-getting-started

Nicer getting started
This commit is contained in:
Pradyun Gedam 2019-09-24 23:32:31 +05:30 committed by GitHub
commit 38f75f90a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,11 +11,11 @@ process, please `open an issue`_ about it on the issue tracker.
Development Environment
-----------------------
pip uses :pypi:`tox` for testing against multiple different Python environments
and ensuring reproducible environments for linting and building documentation.
pip is a command line application written in Python. For developing pip,
you should `install Python`_ on your computer.
For developing pip, you need to install ``tox`` on your system. Often, you can
just do ``python -m pip install tox`` to install and use it.
For developing pip, you need to install :pypi:`tox`. Often, you can run
``python -m pip install tox`` to install and use it.
Running pip From Source Tree
----------------------------
@ -30,8 +30,9 @@ from the ``src`` directory:
Running Tests
-------------
pip uses the :pypi:`pytest` test framework, :pypi:`mock` and :pypi:`pretend`
for testing. These are automatically installed by tox for running the tests.
pip's tests are written using the :pypi:`pytest` test framework, :pypi:`mock`
and :pypi:`pretend`. :pypi:`tox` is used to automate the setup and execution of
pip's tests.
To run tests locally, run:
@ -42,7 +43,7 @@ To run tests locally, run:
The example above runs tests against Python 3.6. You can also use other
versions like ``py27`` and ``pypy3``.
``tox`` has been configured to any additional arguments it is given to
``tox`` has been configured to forward any additional arguments it is given to
``pytest``. This enables the use of pytest's `rich CLI`_. As an example, you
can select tests using the various ways that pytest provides:
@ -112,5 +113,6 @@ To build it locally, run:
The built documentation can be found in the ``docs/build`` folder.
.. _`open an issue`: https://github.com/pypa/pip/issues/new?title=Trouble+with+pip+development+environment
.. _`install Python`: https://realpython.com/installing-python/
.. _`PEP 484 type-comments`: https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code
.. _`rich CLI`: https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests