[med-svn] [python-pbalign] 01/07: Try to generate manpages at build-time

Afif Elghraoui afif-guest at moszumanska.debian.org
Sat Sep 5 09:29:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

afif-guest pushed a commit to branch master
in repository python-pbalign.

commit e72ef892a83453bc64b3d034f1174158e6fdba6b
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Fri Sep 4 22:40:54 2015 -0700

    Try to generate manpages at build-time
    
    This isn't working because calling the executables while they're
    not installed leads to:
    "pkg_resources.DistributionNotFound: The 'pbalign==0.2.0' distribution was not found and is required by the application"
    when help2man tries to call pbalign.
---
 debian/control |  5 ++++-
 debian/rules   | 12 ++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 9d68938..e93576f 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,10 @@ Build-Depends: debhelper (>= 9),
 	       dh-python,
 	       python-all,
 	       python-setuptools,
-	       python-pbcore (>= 0.8.5)
+	       python-pbcore (>= 0.8.5),
+	       help2man,
+	       python-pkg-resources,
+	       blasr
 Standards-Version: 3.9.6
 Homepage: https://github.com/PacificBiosciences/pbalign
 Vcs-Git: git://anonscm.debian.org/debian-med/python-pbalign.git
diff --git a/debian/rules b/debian/rules
index 0c8c1d6..2f3d62c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,5 +7,17 @@ include /usr/share/dpkg/default.mk
 
 export PYBUILD_NAME = pbalign
 
+BUILDDIR = $(CURDIR)/debian/$(DEB_SOURCE)
+HELP2MAN = help2man --no-info -v $(DEB_VERSION)
+MANDIR = $(BUILDDIR)/usr/share/man/man1
+
 %:
 	LC_ALL=C.UTF-8 dh $@ --with=python2 --buildsystem=pybuild
+
+override_dh_auto_install:
+	dh_auto_install
+	mkdir -p $(MANDIR)
+	for executable in $(BUILDDIR)/usr/bin/*;			    \
+	do								    \
+	    $(HELP2MAN) $$executable > $(MANDIR)/`basename $$executable.1`; \
+	done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pbalign.git



More information about the debian-med-commit mailing list