File: rules

package info (click to toggle)
python-imaplib2 2.57-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 704 kB
  • sloc: python: 9,789; makefile: 16
file content (31 lines) | stat: -rwxr-xr-x 863 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=imaplib2
export PYBUILD_DISABLE=test

# Upstream ships two different versions of imaplib2, one for Python 2 and one
# for Python 3. In order to have python3-imaplib2 install the Python 3 version,
# create a temporary directory where we rename imaplib2.py3 to imaplib2.py
# and set this as the source files directory for Python 3.
export PYBUILD_DIR_python3=py3_src_dir


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

py3_src_dir:
	mkdir -p py3_src_dir
	cp -a imaplib2.py3 py3_src_dir/imaplib2.py
	cp -a setup.py py3_src_dir/setup.py

.PHONY: override_dh_auto_configure
override_dh_auto_configure: py3_src_dir
	dh_auto_configure

.PHONY: override_dh_auto_clean
override_dh_auto_clean: py3_src_dir
	dh_auto_clean
	rm -rf py3_src_dir