File: Makefile

package info (click to toggle)
python-sponge 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 1,300 kB
  • ctags: 411
  • sloc: python: 2,870; makefile: 130
file content (55 lines) | stat: -rw-r--r-- 1,542 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
version := `python -c 'import sponge; print sponge.__version__'`
package-name := sponge-${version}
debian-name := python-sponge_${version}
debian-tarball-name := ${debian-name}.orig.tar.gz

all: clean test

clean:
	@echo "Cleaning up all *.pyc files ..."
	@find . -name '*.pyc' -delete
	@echo "Cleaning up coverage metadata ..."
	@rm -f .coverage
	@echo "Cleaning up build files ..."
	@rm -rf build
test:
	@echo "Running all tests ..."
	@nosetests -sd --with-coverage --cover-package=sponge tests/unit tests/functional
	@echo "Done."

unit:
	@echo "Running unit tests ..."
	@nosetests -sd --with-coverage --cover-package=sponge tests/unit
	@echo "Done."

functional:
	@echo "Running functional tests ..."
	@nosetests -sd --with-coverage --cover-package=sponge tests/functional
	@echo "Done."

build: test
	@echo "Building sponge"
	@python setup.py build
	@echo "Done."

tarball: test
	@make clean
	@echo "Preparing tarball ..."
	@cp -drf . ../${package-name}
	@rm -rf ../${package-name}/.git
	@echo "Creating tarball ..."
	@tar czf ${package-name}.tar.gz ../${package-name}
	@rm -rf ../${package-name}
	@echo "Tarball created at at "${package-name}.tar.gz

deb-tarball: test
	@make clean
	@echo "Preparing tarball ..."
	@cp -drf . ../${package-name}
	@rm -rf ../${package-name}/.git
	@rm -rf ../${package-name}/debian
	@rm -rf ../${package-name}/docs/_build
	@echo "Creating tarball ..."
	@tar czf ../${debian-tarball-name} ../${package-name}
	@cp -drf debian ../${package-name}/debian
	@echo "Tarball created at at ../"${debian-tarball-name}