Fix build error with Ubuntu 20.04 83/232883/7 debian/0.9.20
authorbiao716.wang <biao716.wang@samsung.com>
Fri, 8 May 2020 06:23:41 +0000 (15:23 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Fri, 8 May 2020 09:12:48 +0000 (18:12 +0900)
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>
.pydoctor.cfg [new file with mode: 0755]
debian/control
debian/rules
gen_apidocs.sh [new file with mode: 0755]

diff --git a/.pydoctor.cfg b/.pydoctor.cfg
new file mode 100755 (executable)
index 0000000..ede8e51
--- /dev/null
@@ -0,0 +1,4 @@
+projectname: git-buildpackage
+projecturl: https://honk.sigxcpu.org/piki/projects/git-buildpackage/
+htmloutput: build/apidocs
+packages: gbp,tests/doctests/
index ed9a16759f79b5905908fa5cd0e4f63f0ab16754..34cc097822963d3d95af62641e076d17cf79f624 100755 (executable)
@@ -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,
index a81edb1f60213f7a05aa8c93e452c7763f192c1f..434e58c2cea6e4331b2573fb95eb2dd551eb13a4 100755 (executable)
@@ -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 (executable)
index 0000000..fd61d73
--- /dev/null
@@ -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
+