File: rules

package info (click to toggle)
python-simpy 2.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,852 kB
  • sloc: python: 11,172; makefile: 143
file content (60 lines) | stat: -rwxr-xr-x 1,646 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
#!/usr/bin/make -f
# -*- coding: utf-8 -*-

#export DH_VERBOSE=1

PY3VERSIONS = $(shell py3versions -vr)

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build

	set -e; for version in $(PY3VERSIONS); do \
	  python$$version setup.py build; \
	done

	$(MAKE) -C docs html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -c 'import SimPy; SimPy.test()'" dh_auto_test
endif

override_dh_installchangelogs:
	dh_installchangelogs
	# install the upstream changelog at the right place in the doc package
	dh_installchangelogs -ppython-simpy-doc docs/source/Manuals/HISTORY.rst

override_dh_compress:
	dh_compress -X.py -X.txt

override_dh_auto_install:
	# Replace broken shebangs with /usr/bin/python3
	find build/ -name '*.py' -exec sed -i -e '1s|^#!.*python.*|#!/usr/bin/python3|' '{}' ';'

	dh_auto_install

	set -e; for version in $(PY3VERSIONS); do \
	  python$$version setup.py install --no-compile -O0 --install-layout=deb --root $(CURDIR)/debian/tmp; \
	done

override_dh_auto_clean:
	dh_auto_clean

	set -e; for version in $(PY3VERSIONS); do \
	  python$$version setup.py clean; \
	done

	rm -rf SimPy/__pycache__/

	rm -rf docs/html

override_dh_python3:
	dh_python3

	mkdir -p $(CURDIR)/debian/python-simpy-gui/usr/lib/python3/dist-packages/SimPy/
	for guifile in GUIDebug.py SimGUI.py SimPlot.py SimulationGUIDebug.py tkconsole.py tkprogressbar.py ; do \
		mv $(CURDIR)/debian/python3-simpy/usr/lib/python3/dist-packages/SimPy/$$guifile $(CURDIR)/debian/python-simpy-gui/usr/lib/python3/dist-packages/SimPy/ ; \
	done