Home | History | Annotate | Download | only in coverage
      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 
      4 # Makefile for utility work on coverage.py.
      5 
      6 default:
      7 	@echo "* No default action *"
      8 
      9 clean:
     10 	-rm -f *.pyd */*.pyd
     11 	-rm -f *.so */*.so
     12 	-PYTHONPATH=. python tests/test_farm.py clean
     13 	-rm -rf build coverage.egg-info dist htmlcov
     14 	-rm -f *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*/*.pyc
     15 	-rm -f *.pyo */*.pyo */*/*.pyo */*/*/*.pyo */*/*/*/*.pyo */*/*/*/*/*.pyo
     16 	-rm -f *.bak */*.bak */*/*.bak */*/*/*.bak */*/*/*/*.bak */*/*/*/*/*.bak
     17 	-rm -f *$$py.class */*$$py.class */*/*$$py.class */*/*/*$$py.class */*/*/*/*$$py.class */*/*/*/*/*$$py.class
     18 	-rm -rf __pycache__ */__pycache__ */*/__pycache__ */*/*/__pycache__ */*/*/*/__pycache__ */*/*/*/*/__pycache__
     19 	-rm -f coverage/*,cover
     20 	-rm -f MANIFEST
     21 	-rm -f .coverage .coverage.* coverage.xml .metacov* .noseids
     22 	-rm -f tests/zipmods.zip
     23 	-rm -rf tests/eggsrc/build tests/eggsrc/dist tests/eggsrc/*.egg-info
     24 	-rm -f setuptools-*.egg distribute-*.egg distribute-*.tar.gz
     25 	-rm -rf doc/_build doc/_spell
     26 
     27 sterile: clean
     28 	-rm -rf .tox*
     29 
     30 LINTABLE = coverage igor.py setup.py tests ci/*.py
     31 
     32 lint:
     33 	-pylint $(LINTABLE)
     34 	python -m tabnanny $(LINTABLE)
     35 	python igor.py check_eol
     36 
     37 spell:
     38 	-pylint --disable=all --enable=spelling $(LINTABLE)
     39 
     40 pep8:
     41 	pep8 --filename=*.py --repeat $(LINTABLE)
     42 
     43 test:
     44 	tox -e py27,py34 $(ARGS)
     45 
     46 metacov:
     47 	COVERAGE_COVERAGE=yes tox $(ARGS)
     48 
     49 metahtml:
     50 	python igor.py combine_html
     51 
     52 # Kitting
     53 
     54 kit:
     55 	python setup.py sdist --formats=gztar,zip
     56 
     57 wheel:
     58 	tox -c tox_wheels.ini $(ARGS)
     59 
     60 kit_upload:
     61 	twine upload dist/*
     62 
     63 kit_local:
     64 	cp -v dist/* `awk -F "=" '/find-links/ {print $$2}' ~/.pip/pip.conf`
     65 	# pip caches wheels of things it has installed. Clean them out so we
     66 	# don't go crazy trying to figure out why our new code isn't installing.
     67 	find ~/Library/Caches/pip/wheels -name 'coverage-*' -delete
     68 
     69 download_appveyor:
     70 	python ci/download_appveyor.py nedbat/coveragepy
     71 
     72 pypi:
     73 	python setup.py register
     74 
     75 build_ext:
     76 	python setup.py build_ext
     77 
     78 install:
     79 	python setup.py install
     80 
     81 uninstall:
     82 	-rm -rf $(PYHOME)/lib/site-packages/coverage*
     83 	-rm -rf $(PYHOME)/scripts/coverage*
     84 
     85 # Documentation
     86 
     87 SPHINXBUILD = sphinx-build
     88 SPHINXOPTS = -a -E doc
     89 WEBHOME = ~/web/stellated/
     90 WEBSAMPLE = $(WEBHOME)/files/sample_coverage_html
     91 WEBSAMPLEBETA = $(WEBHOME)/files/sample_coverage_html_beta
     92 
     93 docreqs:
     94 	pip install -r doc/requirements.pip
     95 
     96 dochtml:
     97 	$(SPHINXBUILD) -b html $(SPHINXOPTS) doc/_build/html
     98 	@echo
     99 	@echo "Build finished. The HTML pages are in doc/_build/html."
    100 
    101 docspell:
    102 	$(SPHINXBUILD) -b spelling $(SPHINXOPTS) doc/_spell
    103 
    104 publish:
    105 	rm -f $(WEBSAMPLE)/*.*
    106 	mkdir -p $(WEBSAMPLE)
    107 	cp doc/sample_html/*.* $(WEBSAMPLE)
    108 
    109 publishbeta:
    110 	rm -f $(WEBSAMPLEBETA)/*.*
    111 	mkdir -p $(WEBSAMPLEBETA)
    112 	cp doc/sample_html_beta/*.* $(WEBSAMPLEBETA)
    113