Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
  2. # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
  3. # Makefile for utility work on coverage.py.
  4. default:
  5. @echo "* No default action *"
  6. clean:
  7. -rm -f *.pyd */*.pyd
  8. -rm -f *.so */*.so
  9. -PYTHONPATH=. python tests/test_farm.py clean
  10. -rm -rf tests/farm/*/out
  11. -rm -rf build coverage.egg-info dist htmlcov
  12. -rm -f *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*/*.pyc
  13. -rm -f *.pyo */*.pyo */*/*.pyo */*/*/*.pyo */*/*/*/*.pyo */*/*/*/*/*.pyo
  14. -rm -f *.bak */*.bak */*/*.bak */*/*/*.bak */*/*/*/*.bak */*/*/*/*/*.bak
  15. -rm -f *$$py.class */*$$py.class */*/*$$py.class */*/*/*$$py.class */*/*/*/*$$py.class */*/*/*/*/*$$py.class
  16. -rm -rf __pycache__ */__pycache__ */*/__pycache__ */*/*/__pycache__ */*/*/*/__pycache__ */*/*/*/*/__pycache__
  17. -rm -f coverage/*,cover
  18. -rm -f MANIFEST
  19. -rm -f .coverage .coverage.* coverage.xml .metacov* .noseids
  20. -rm -f tests/zipmods.zip
  21. -rm -rf tests/eggsrc/build tests/eggsrc/dist tests/eggsrc/*.egg-info
  22. -rm -f setuptools-*.egg distribute-*.egg distribute-*.tar.gz
  23. -rm -rf doc/_build doc/_spell
  24. sterile: clean
  25. -rm -rf .tox*
  26. LINTABLE = coverage igor.py setup.py tests ci/*.py
  27. lint:
  28. -pylint $(LINTABLE)
  29. python -m tabnanny $(LINTABLE)
  30. python igor.py check_eol
  31. spell:
  32. -pylint --disable=all --enable=spelling $(LINTABLE)
  33. pep8:
  34. pep8 --filename=*.py --repeat $(LINTABLE)
  35. test:
  36. tox -e py27,py35 $(ARGS)
  37. metacov:
  38. COVERAGE_COVERAGE=yes tox $(ARGS)
  39. metahtml:
  40. python igor.py combine_html
  41. # Kitting
  42. kit:
  43. python setup.py sdist --formats=gztar,zip
  44. wheel:
  45. tox -c tox_wheels.ini $(ARGS)
  46. kit_upload:
  47. twine upload dist/*
  48. kit_local:
  49. # pip.conf looks like this:
  50. # [global]
  51. # find-links = file:///Users/ned/Downloads/local_pypi
  52. cp -v dist/* `awk -F "//" '/find-links/ {print $$2}' ~/.pip/pip.conf`
  53. # pip caches wheels of things it has installed. Clean them out so we
  54. # don't go crazy trying to figure out why our new code isn't installing.
  55. find ~/Library/Caches/pip/wheels -name 'coverage-*' -delete
  56. download_appveyor:
  57. python ci/download_appveyor.py nedbat/coveragepy
  58. pypi:
  59. python setup.py register
  60. build_ext:
  61. python setup.py build_ext
  62. install:
  63. python setup.py install
  64. uninstall:
  65. -rm -rf $(PYHOME)/lib/site-packages/coverage*
  66. -rm -rf $(PYHOME)/scripts/coverage*
  67. # Documentation
  68. SPHINXBUILD = sphinx-build
  69. SPHINXOPTS = -a -E doc
  70. WEBHOME = ~/web/stellated/
  71. WEBSAMPLE = $(WEBHOME)/files/sample_coverage_html
  72. WEBSAMPLEBETA = $(WEBHOME)/files/sample_coverage_html_beta
  73. docreqs:
  74. pip install -r doc/requirements.pip
  75. dochtml:
  76. $(SPHINXBUILD) -b html $(SPHINXOPTS) doc/_build/html
  77. @echo
  78. @echo "Build finished. The HTML pages are in doc/_build/html."
  79. docspell:
  80. $(SPHINXBUILD) -b spelling $(SPHINXOPTS) doc/_spell
  81. publish:
  82. rm -f $(WEBSAMPLE)/*.*
  83. mkdir -p $(WEBSAMPLE)
  84. cp doc/sample_html/*.* $(WEBSAMPLE)
  85. publishbeta:
  86. rm -f $(WEBSAMPLEBETA)/*.*
  87. mkdir -p $(WEBSAMPLEBETA)
  88. cp doc/sample_html_beta/*.* $(WEBSAMPLEBETA)