File: Makefile

package info (click to toggle)
pysdl2 0.9.6+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,204 kB
  • sloc: python: 16,109; makefile: 213; sh: 32
file content (86 lines) | stat: -rw-r--r-- 1,969 bytes parent folder | download
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
PYTHON ?= python
top_srcdir := `pwd`
PYTHONPATH ?= $(top_srcdir)
SUBDIRS = \
	$(top_srcdir)/sdl2 \
	$(top_srcdir)/sdl2/ext \
	$(top_srcdir)/sdl2/test \
	$(top_srcdir)/sdl2/test/resources \
	$(top_srcdir)/sdl2/test/util \
	$(top_srcdir)/doc \
	$(top_srcdir)/doc/tutorial \
	$(top_srcdir)/doc/modules \
	$(top_srcdir)/examples

INTERPRETERS = python2.7 python3.3 python3.4 python3.5 pypy

all: clean build

dist: clean docs
	@echo "Creating dist..."
	@$(PYTHON) setup.py sdist --format gztar
	@$(PYTHON) setup.py sdist --format zip

bdist: clean docs
	@echo "Creating bdist..."
	@$(PYTHON) setup.py bdist

build:
	@echo "Running build"
	@$(PYTHON) setup.py build
	@echo "Build finished, invoke 'make install' to install."


install:
	@echo "Installing..."
	@$(PYTHON) setup.py install

clean:
	@echo "Cleaning up in $(top_srcdir)/ ..."
	@rm -f *.cache *.core *~ MANIFEST *.pyc *.orig *.rej
	@rm -rf __pycache__
	@rm -rf build dist doc/html

	@for dir in $(SUBDIRS); do \
		echo "Cleaning up in $$dir ..."; \
		if test -f $$dir/Makefile; then \
			make -C $$dir clean; \
		fi; \
		cd $$dir && rm -f *.cache *.core *~ MANIFEST *.pyc *.orig *.rej; \
	done

docs:
	@echo "Creating docs package"
	@rm -rf doc/html
	@cd doc && PYTHONPATH=$(PYTHONPATH) make html
	@mv doc/_build/html doc/html
	@rm -rf doc/_build
	@cd doc && make clean

release: dist

runtest:
	@PYTHONPATH=$(PYTHONPATH) $(PYTHON) -B -m unittest discover sdl2.test -p *test.py -v

testall:
	@for interp in $(INTERPRETERS); do \
		PYTHONPATH=$(PYTHONPATH) $$interp -B -m unittest discover sdl2.test -p *test.py -v || true; \
	done

# Do not run these in production environments! They are for testing
# purposes only!

buildall: clean
	@for interp in $(INTERPRETERS); do \
		$$interp setup.py build; \
	done

installall:
	@for interp in $(INTERPRETERS); do \
		$$interp setup.py install; \
	done

purge_installs:
	@for interp in $(INTERPRETERS); do \
		rm -rf /usr/local/lib/$$interp/site-packages/sdl2*; \
	done