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
export PYBUILD_NAME=gitlab
export DH_VERBOSE=1
export PYBUILD_TEST_ARGS=--ignore=gitlab/tests/objects/test_todos.py
# define DEB_VERSION
include /usr/share/dpkg/default.mk
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_auto_build:
dh_auto_build
PYTHONPATH=. http_proxy='http://127.0.0.1:9/' python3 -m sphinx -N -E -bhtml docs build/html
rm -rf ./build/html/.doctrees
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
dh_sphinxdoc -ppython-gitlab-doc
endif
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
# Integration tests require tox and docker :-(
python3 -m pytest tests/unit/
endif
execute_after_dh_auto_install:
mkdir -p debian/gitlab-cli/usr/bin
mv debian/python3-gitlab/usr/bin/gitlab debian/gitlab-cli/usr/bin/python-gitlab
rm ./debian/python3-gitlab/usr/lib/python*/dist-packages/docs -rf
PYTHONPATH="./debian/python3-gitlab/usr/lib/$(shell py3versions -d)/dist-packages" \
help2man -N --no-discard-stderr \
--no-info --version-string="$(DEB_VERSION)" \
-n "GitLab API Command Line Interface" ./debian/gitlab-cli/usr/bin/python-gitlab > debian/python-gitlab.1
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
|