File: Makefile

package info (click to toggle)
python-graph 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,400 kB
  • sloc: python: 3,662; makefile: 68
file content (100 lines) | stat: -rw-r--r-- 2,265 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# python-graph
# Makefile


# Module directories -------------------------------------------------

CORE_DIR="core/"
DOT_DIR="dot/"
TESTS_DIR="tests/"
DOCS_DIR="docs/"
TEMP="temp/"
PYTHONPATH="`pwd`/core:`pwd`/dot"


# General ------------------------------------------------------------

nothing:

sdist: clean sdist-core sdist-dot
	rm -rf dist
	mkdir dist
	cp */dist/* dist


# Core ---------------------------------------------------------------

install-core:
	cd ${CORE_DIR} && ./setup.py install

sdist-core: clean
	cd ${CORE_DIR} && ./setup.py sdist


# Dot ----------------------------------------------------------------

install-dot:
	cd ${DOT_DIR} && ./setup.py install

sdist-dot: clean
	cd ${DOT_DIR} && ./setup.py sdist


# Docs ---------------------------------------------------------------

docs: cleanpyc
	rm -rf ${DOCS_DIR} ${TEMP}
	mkdir -p ${TEMP}
	cp -R ${CORE_DIR}/pygraph ${TEMP}
	cp -Rn ${DOT_DIR}/pygraph ${TEMP}/pygraph/
	epydoc -v --no-frames --no-sourcecode --name="python-graph" \
		--url="http://code.google.com/p/python-graph/" \
		--inheritance listed --no-private --html \
		--graph classtree \
		--css misc/epydoc.css -o docs ${TEMP}/pygraph/*.py \
		${TEMP}/pygraph/algorithms/*py \
		${TEMP}/pygraph/algorithms/heuristics/*.py \
		${TEMP}/pygraph/algorithms/filters/* \
		${TEMP}/pygraph/readwrite/* \
		${TEMP}/pygraph/classes/*.py \
		${TEMP}/pygraph/mixins/*.py
		rm -rf ${TEMP}


# Tests --------------------------------------------------------------

test:
	export PYTHONPATH=${PYTHONPATH} && cd ${TESTS_DIR} && python testrunner.py

test3:
	export PYTHONPATH=${PYTHONPATH} && cd ${TESTS_DIR} && python3 testrunner.py

tests: test


# Tests --------------------------------------------------------------

console:
	export PYTHONPATH=${PYTHONPATH} && cd ${TESTS_DIR} && python

console3:
	export PYTHONPATH=${PYTHONPATH} && cd ${TESTS_DIR} && python3


# Cleaning -----------------------------------------------------------

cleanpyc:
	find . -name *.pyc -exec rm {} \;
	find . -name __pycache__ -exec rm -rf {} \;

clean: cleanpyc
	rm -rf ${DOCS_DIR}
	rm -rf */dist
	rm -rf */build
	rm -rf */*.egg-info
	rm -rf dist


# Phony rules --------------------------------------------------------

.PHONY: clean cleanpyc docs-core