Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8682 > unrolled thread

How to use pybuild without proper build system

Started byAndreas Tille <andreas@an3as.eu>
First post2016-07-26 16:20 +0200
Last post2016-07-26 16:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  How to use pybuild without proper build system Andreas Tille <andreas@an3as.eu> - 2016-07-26 16:20 +0200
    Re: How to use pybuild without proper build system Piotr Ożarowski <piotr@debian.org> - 2016-07-26 16:50 +0200

#8682 — How to use pybuild without proper build system

FromAndreas Tille <andreas@an3as.eu>
Date2016-07-26 16:20 +0200
SubjectHow to use pybuild without proper build system
Message-ID<rZbnc-2Yp-7@gated-at.bofh.it>
Hi,

I need to package python-lefse[1] as a predependency for some Debian Med
package (metabit).  There is no actuall build system just a set of *.py
files but pybuild says:

	$ pybuild --detect
	distutils

Is there any sensible way to use pybuild for this module (or is there a
simple setup.py template I could throw in via quilt)?

Kind regards

      Andreas.

[1] https://anonscm.debian.org/git/debian-med/python-lefse.git

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#8683

FromPiotr Ożarowski <piotr@debian.org>
Date2016-07-26 16:50 +0200
Message-ID<rZbQd-39o-17@gated-at.bofh.it>
In reply to#8682
[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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web