OLD | NEW |
(Empty) | |
| 1 .. _install: |
| 2 |
| 3 ============ |
| 4 Installation |
| 5 ============ |
| 6 |
| 7 :history: 20100725T225600, new for 3.4. |
| 8 :history: 20100820T151500, updated for 3.4b1. |
| 9 :history: 20100906T134800, updated for 3.4b2. |
| 10 :history: 20110604T213400, updated for 3.5b1. |
| 11 :history: 20110629T082400, updated for 3.5. |
| 12 :history: 20110923T081900, updated for 3.5.1. |
| 13 :history: 20120429T162500, updated for 3.5.2b1. |
| 14 :history: 20120503T234000, updated for 3.5.2. |
| 15 :history: 20120929T093600, updated for 3.5.3. |
| 16 :history: 20121117T095000, Now setuptools is a pre-req. |
| 17 :history: 20121128T203000, updated for 3.6b1. |
| 18 :history: 20121223T180800, updated for 3.6b2. |
| 19 :history: 20121229T112400, updated for 3.6b3. |
| 20 :history: 20130105T174400, updated for 3.6. |
| 21 |
| 22 |
| 23 .. highlight:: console |
| 24 .. _coverage_pypi: http://pypi.python.org/pypi/coverage |
| 25 .. _setuptools: http://pypi.python.org/pypi/setuptools |
| 26 .. _Distribute: http://packages.python.org/distribute/ |
| 27 |
| 28 |
| 29 Installing coverage.py is done in the usual ways. You must have `setuptools`_ |
| 30 or `Distribute`_ installed already, and then you: |
| 31 |
| 32 #. Download the appropriate kit from the |
| 33 `coverage page on the Python Package Index`__. |
| 34 |
| 35 #. Run ``python setup.py install``. |
| 36 |
| 37 or, use:: |
| 38 |
| 39 $ pip install coverage |
| 40 |
| 41 or even:: |
| 42 |
| 43 $ easy_install coverage |
| 44 |
| 45 .. __: coverage_pypi_ |
| 46 |
| 47 |
| 48 Installing from source |
| 49 ---------------------- |
| 50 |
| 51 Coverage.py includes a C extension for speed. If you are installing from source, |
| 52 you may need to install the python-dev support files, for example with:: |
| 53 |
| 54 $ sudo apt-get install python-dev |
| 55 |
| 56 |
| 57 Installing on Windows |
| 58 --------------------- |
| 59 |
| 60 For Windows, kits are provided on the `PyPI page`__ for different versions of |
| 61 Python and different CPU architectures. These kits require that `setuptools`_ be |
| 62 installed as a pre-requisite, but otherwise are self-contained. They have the |
| 63 C extension pre-compiled so there's no need to worry about compilers. |
| 64 |
| 65 .. __: coverage_pypi_ |
| 66 |
| 67 |
| 68 Checking the installation |
| 69 ------------------------- |
| 70 |
| 71 If all went well, you should be able to open a command prompt, and see |
| 72 coverage installed properly:: |
| 73 |
| 74 $ coverage --version |
| 75 Coverage.py, version 3.6. http://nedbatchelder.com/code/coverage |
| 76 |
| 77 You can also invoke coverage as a module:: |
| 78 |
| 79 $ python -m coverage --version |
| 80 Coverage.py, version 3.6. http://nedbatchelder.com/code/coverage |
OLD | NEW |