diff options
author | biao716.wang <biao716.wang@samsung.com> | 2020-05-08 15:23:41 +0900 |
---|---|---|
committer | biao716.wang <biao716.wang@samsung.com> | 2020-05-08 18:12:48 +0900 |
commit | 5c3f6af71cf1838864898a37e00497f1a3b33336 (patch) | |
tree | 77f83a3e07b10a2f17af4a2a7f55ffc26687abc8 | |
parent | 72556c55c434f7f0d59d4f00c56eb0e83893ee19 (diff) | |
download | git-buildpackage-5c3f6af71cf1838864898a37e00497f1a3b33336.tar.gz git-buildpackage-5c3f6af71cf1838864898a37e00497f1a3b33336.tar.bz2 git-buildpackage-5c3f6af71cf1838864898a37e00497f1a3b33336.zip |
Fix build error with Ubuntu 20.04debian/0.9.20
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 <biao716.wang@samsung.com>
-rwxr-xr-x | .pydoctor.cfg | 4 | ||||
-rwxr-xr-x | debian/control | 3 | ||||
-rwxr-xr-x | debian/rules | 10 | ||||
-rwxr-xr-x | gen_apidocs.sh | 11 |
4 files changed, 20 insertions, 8 deletions
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 + |