File: Makefile

package info (click to toggle)
systemfixtures 0.6.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: python: 841; makefile: 221; sh: 2
file content (44 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (3)
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
PYTHON ?= python
PYTHON_MAJOR = $(shell $(PYTHON) -c "import sys; print(sys.version_info.major)")

# These paths are valid on Debian-based systems, on other systems you
# might have to set these variables from the command line.
COVERAGE ?= $(PYTHON)-coverage
SPHINXBUILD ?= /usr/share/sphinx/scripts/python$(PYTHON_MAJOR)/sphinx-build

SOURCE = systemfixtures

all: check check-doc

check:
	rm -f .coverage
	$(COVERAGE) run --source=$(SOURCE) -m testtools.run discover
	$(COVERAGE) report -m --fail-under=100 --rcfile=.coveragerc.py$(PYTHON_MAJOR)

check-doc:
	SPHINXBUILD=$(SPHINXBUILD) $(MAKE) -C doc doctest

dependencies: dependencies-python$(PYTHON_MAJOR)
	sudo apt-get install \
		$(PYTHON)-pbr \
		$(PYTHON)-six \
		$(PYTHON)-fixtures \
		$(PYTHON)-testtools \
		$(PYTHON)-requests-mock \
		$(PYTHON)-fakesleep \
		$(PYTHON)-coverage \
		$(PYTHON)-sphinx

dependencies-python2:
	sudo apt-get install \
		$(PYTHON)-subprocess32

dependencies-python3):

clean:
	rm -rf $(SOURCE).egg-info dist
	rm -f AUTHORS ChangeLog
	find -type f -name "*.pyc" | xargs rm -f
	find -type d -name "__pycache_" | xargs rm -rf

.PHONY: all check check-doc dependencies dependencies-python2 dependencies-python3