From: biao716.wang Date: Fri, 8 May 2020 06:23:41 +0000 (+0900) Subject: Fix build error with Ubuntu 20.04 X-Git-Tag: debian/0.9.20^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c3f6af71cf1838864898a37e00497f1a3b33336;p=tools%2Fgit-buildpackage.git Fix build error with Ubuntu 20.04 For Ubuntu 20.04, there is no python-epydoc and pychecker, change pydoctor to replace epydoc, and about pychecker, there is pylint tools instead. So add gen_apidoc.sh file to distinguish which tool is avaiable. Change-Id: I484ab8f382d186e9293df3966bb4a7869b59d3a0 Signed-off-by: biao716.wang --- diff --git a/.pydoctor.cfg b/.pydoctor.cfg new file mode 100755 index 00000000..ede8e513 --- /dev/null +++ b/.pydoctor.cfg @@ -0,0 +1,4 @@ +projectname: git-buildpackage +projecturl: https://honk.sigxcpu.org/piki/projects/git-buildpackage/ +htmloutput: build/apidocs +packages: gbp,tests/doctests/ diff --git a/debian/control b/debian/control index ed9a1675..34cc0978 100755 --- a/debian/control +++ b/debian/control @@ -9,9 +9,8 @@ Build-Depends: gtk-doc-tools, openjade, perl, - pychecker, python (>> 2.6.6-3~), - python-epydoc, + python-epydoc | pydoctor | python-pydoctor, python-nose, python-pkg-resources, python-setuptools, diff --git a/debian/rules b/debian/rules index a81edb1f..434e58c2 100755 --- a/debian/rules +++ b/debian/rules @@ -29,18 +29,16 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) export GIT_COMMITTER_EMAIL=$$GIT_AUTHOR_EMAIL; \ PYTHONPATH=. \ python setup.py nosetests - - PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q \ - gbp gbp.scripts gbp.git gbp.deb + else @echo "Checks disabled via DEB_BUILD_OPTIONS" endif override_dh_auto_build: dh_auto_build - epydoc -v --config=setup.cfg - make -C docs/ - + make -C docs + #generate apidocs + sh gen_apidocs.sh override_dh_auto_install: dh_auto_install dh_bash-completion diff --git a/gen_apidocs.sh b/gen_apidocs.sh new file mode 100755 index 00000000..fd61d73c --- /dev/null +++ b/gen_apidocs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +#generate apidocs +which epydoc > /dev/null +if [ $? -eq 0 ];then + epydoc -v --config=setup.cfg +else + mkdir -p build + pydoctor -v --config=.pydoctor.cfg +fi +