File: Makefile

package info (click to toggle)
python-pbcore 2.1.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,476 kB
  • sloc: python: 13,393; xml: 2,504; makefile: 232; sh: 66
file content (78 lines) | stat: -rw-r--r-- 1,823 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.PHONY: clean doc doc-clean tests check test install build bdist gh-pages

build:
	python setup.py build

bdist:
	python setup.py build --executable="/usr/bin/env python"
	python setup.py bdist --formats=egg

install:
	@which pip > /dev/null
	@pip freeze|grep 'pbcore=='>/dev/null \
      && pip uninstall -y pbcore \
      || echo -n ''
	@pip install ./

pylint:
	pylint --errors-only --enable=C0411,W0702,W0401,W0611 pbcore/

autopep8:
	find pbcore -name "*.py" | xargs autopep8 -i
	find tests -name "*.py" | xargs autopep8 -i

clean: doc-clean
	rm -rf build/;\
	find . -name "*.egg-info" | xargs rm -rf;\
	rm -rf dist/;\
	find . -name "*.pyc" | xargs rm -f;
	rm -f nosetests.xml

doc:
	sphinx-apidoc -o doc/ pbcore/ && cd doc/ && make html
doc-clean:
	cd doc && rm -rf _templates _static _build searchindex.js objects.inv

doctest:
	cd doc && make doctest

unit-test:
	pytest
	sed -i -e 's@filename="@filename="./@g' coverage.xml

test: doctest unit-test

tests: test
check: test

GH_PAGES_SOURCES = pbcore doc

gh-pages:
	git checkout gh-pages
	rm -rf _static _sources *.js *.html *.inv
	git checkout master $(GH_PAGES_SOURCES)
	cd doc && make html
	mv -fv doc/_build/html/* .
	rm -rf $(GH_PAGES_SOURCES)
	git add --all && git commit -m "Automatic update of gh-pages branch" && git checkout master

pip-install:
	@which pip > /dev/null
	@pip freeze|grep 'pbcore=='>/dev/null \
      && pip uninstall -y pbcore \
      || echo -n ''
	@pip install --no-index ./


publish-to-pypi:
	@echo "I'm not going to do this for you, but you can do it by:"
	@echo "    % python setup.py sdist upload -r pypi"


validate-metadata:
	xmllint --schema ../xsd-datamodels/PacBioCollectionMetadata.xsd pbcore/data/datasets/CollectionMetadata.xml

wheel:
	which pip
	pip wheel --wheel-dir=${WHEELHOUSE} --no-deps .
	ls -larth ${WHEELHOUSE}