File: rules

package info (click to toggle)
python-bitarray 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,288 kB
  • sloc: python: 11,456; ansic: 7,657; makefile: 73; sh: 6
file content (36 lines) | stat: -rwxr-xr-x 1,170 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
#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=bitarray

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/python3/python.mk

DOCTEMPDIR=$(CURDIR)/debian/buildhtml

export PYBUILD_TEST_CUSTOM := 1
export PYBUILD_TEST_ARGS := {interpreter} -c 'import bitarray; bitarray.test()'

# Move README.html creation here:
# we need to have the build-directory, so that we can import `bitarray`,
# so let's have pybuild do the heavy lifting of locating it
export PYBUILD_AFTER_BUILD=\
mkdir -p $(DOCTEMPDIR)/doc && \
cp $(CURDIR)/README.rst $(CURDIR)/CHANGE_LOG $(CURDIR)/update_doc.py $(DOCTEMPDIR); \
cp $(CURDIR)/doc/*.rst $(DOCTEMPDIR)/doc; cd $(DOCTEMPDIR); \
PYTHONPATH={build_dir} {interpreter} update_doc.py; \
pandoc -r gfm -w html5 -o README.html -s --toc --metadata title="BitArray Documentation" README.rst; \
mv $(DOCTEMPDIR)/README.html $(CURDIR)

execute_before_dh_auto_clean:
	rm -rf $(DOCTEMPDIR) README.html build

override_dh_installchangelogs:
	dh_installchangelogs CHANGE_LOG

execute_after_dh_installexamples:
	find $(CURDIR)/debian/python*-bitarray  -name '.gitignore' -delete

%:
	dh $@ --buildsystem=pybuild