[Debian-med-packaging] How to use pybuild without proper build system

Piotr Ożarowski piotr at debian.org
Tue Jul 26 14:39:55 UTC 2016


[Andreas Tille, 2016-07-26]
> [1] https://anonscm.debian.org/git/debian-med/python-lefse.git

dh_install is my first suggestion. If you need to build extensions for
all supported Python versions, take a look at pybuild's --system=custom¹.

In case of lefse, I'd simply:


diff --git a/debian/control b/debian/control
index e35bbf2..7018c0f 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/python-lefse.git
 Vcs-Git: https://anonscm.debian.org/git/debian-med/python-lefse.git
 Homepage: https://bitbucket.org/nsegata/lefse
 
-Package: python-lefse
+Package: lefse
 Architecture: all
 Depends: ${python:Depends},
          ${misc:Depends},
diff --git a/debian/rules b/debian/rules
index 10f28a4..a7c2af5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,16 @@
 #!/usr/bin/make -f
 
 # DH_VERBOSE := 1
-
-export PYBUILD_NAME=lefse
+DESTDIR=debian/lefse/usr/share/lefse
 
 %:
-	dh $@  --with python2 --buildsystem=pybuild
+	dh $@  --with python2
+
+override_dh_auto_install:
+	mkdir -p $(DESTDIR)
+	cp -r lefsebiom $(DESTDIR)/
+	for i in format_input lefse2circlader plot_cladogram plot_features plot_res qiime2lefse run_lefse;\
+       	do\
+		cp $$i.py $(DESTDIR)/$$i;\
+		dh_link /usr/share/lefse/$$i /usr/bin/$$i;\
+	done


[¹] see manpage or search for "export PYBUILD_SYSTEM=custom" on
    https://wiki.debian.org/Python/Pybuild
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645



More information about the Debian-med-packaging mailing list