File: rules

package info (click to toggle)
cxxheaderparser 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,028 kB
  • sloc: python: 18,204; makefile: 33; sh: 9
file content (40 lines) | stat: -rwxr-xr-x 1,175 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
#!/usr/bin/make -f
# -*- makefile -*-

# For DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=cxxheaderparser

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

#  Some targets choke if version.py doesn't exist, and it only gets created if
#  a .git  dir is present
create_version_file:
	echo "# Autogenerated by debian/rules" > cxxheaderparser/version.py
	echo "__version__ = '$(DEB_VERSION_UPSTREAM)'" >> cxxheaderparser/version.py

execute_before_dh_auto_configure: create_version_file
	:

# This should be execute_after_dh_auto_build, but that fails because the
# module cannot be found. I'll figure that out in the next upload
override_dh_installdocs:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) \
		http_proxy='http://127.0.0.1:9' \
		https_proxy='https://127.0.0.1:9' \
		sphinx-build -b html docs html
endif
	dh_installdocs --package=python-cxxheaderparser-doc --doc-main-package=python3-cxxheaderparser
	dh_installdocs --remaining-packages


execute_before_dh_auto_clean: create_version_file
	:

execute_after_dh_auto_clean:
	rm -f cxxheaderparser/version.py
	rm -rf cxxheaderparser.egg-info/
	rm -rf html