File: rules

package info (click to toggle)
testpath 0.4.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 208 kB
  • sloc: python: 536; makefile: 159; sh: 2
file content (22 lines) | stat: -rwxr-xr-x 875 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
#!/usr/bin/make -f

VERSION = $(shell PYTHONPATH=$PWD python3 -c 'import testpath; print(testpath.__version__)')

#export DH_VERBOSE=1
export PYBUILD_NAME=testpath
export PYBUILD_SYSTEM=custom
export PYBUILD_DISABLE=configure build clean
export PYBUILD_INSTALL_ARGS=mkdir -p {destdir}/usr/lib/python{version}/dist-packages/ && \
  cp -R testpath {destdir}/usr/lib/python{version}/dist-packages/ && \
  sed -e 's/VERSION/$(VERSION)/g' debian/testpath.egg-info > \
    {destdir}/usr/lib/python{version}/dist-packages/testpath-$(VERSION).egg-info
export PYBUILD_TEST_ARGS_python3=nosetests3

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

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html doc debian/python-testpath-doc/usr/share/doc/python-testpath-doc/html
	dh_sphinxdoc -O--buildsystem=pybuild
endif