File: rules

package info (click to toggle)
python-fastimport 0.9.6-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 832 kB
  • ctags: 389
  • sloc: python: 2,960; makefile: 21; sh: 2
file content (29 lines) | stat: -rwxr-xr-x 1,120 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
#!/usr/bin/make -f

%:
	dh --with python2,python3,pypy --buildsystem=python_distutils $*

override_dh_auto_build:
	dh_auto_build --buildsystem=python_distutils -- --executable=/usr/bin/python
	pypy setup.py build --debug

override_dh_auto_install:
	dh_auto_install
	set -ex; for python in $(shell py3versions -r); do \
		$$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
	done;
	pypy setup.py install --root debian/tmp --install-layout deb
	rm -rf debian/tmp/usr/lib/pypy/bin
	# Install the python2 files to python-fastimport
	dh_install "debian/tmp/usr/lib/python2*/*-packages" -p python-fastimport
	# Install the python23files to python3-fastimport
	dh_install "debian/tmp/usr/lib/python3*/*-packages" -p python3-fastimport
	# Install the pypy files to pypy-fastimport
	dh_install "debian/tmp/usr/lib/pypy/" -p pypy-fastimport

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	PYTHONPATH=. python -m unittest fastimport.tests.test_suite
	PYTHONPATH=. python3 -m unittest fastimport.tests.test_suite
	PYTHONPATH=. pypy -m unittest fastimport.tests.test_suite
endif