File: rules

package info (click to toggle)
mysql-connector-python 1.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,716 kB
  • ctags: 5,129
  • sloc: python: 23,339; makefile: 28
file content (39 lines) | stat: -rwxr-xr-x 1,330 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYTHON2=$(shell pyversions -r)
PYTHON3=$(shell py3versions -r)

%:
	dh $@ --with python2,python3

override_dh_installexamples:
	dh_installexamples -ppython-mysql.connector  python2/examples/*.py
	dh_installexamples -ppython3-mysql.connector python3/examples/*.py

override_dh_install:
	set -e; \
	for python in $(PYTHON2); do \
		$$python setup.py install --install-layout=deb --root $(CURDIR)/debian/python-mysql.connector ; \
	done
	set -e; \
	for python in $(PYTHON3); do \
		$$python setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-mysql.connector ; \
	done
	dh_install

override_dh_installdocs:
	dh_installdocs -A docs/README_DOCS.txt

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	-for python in $(PYTHON2) $(PYTHON3); do \
		LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ;\
		mkdir -p $(CURDIR)/mysql_myconnpy/ ; \
		PYTHONPATH=$(CURDIR)/$$LIB $$python unittests.py --with-mysql=/usr/ --mysql-topdir=$(CURDIR)/mysql_myconnpy/ --verbosity=2 --bind-address=:: --host=::1 --stats ; \
		rm -rf $(CURDIR)/mysql_myconnpy/ ; \
	done
endif