[med-svn] [python-avro] 04/07: prepare python2 sources before building
Afif Elghraoui
afif-guest at moszumanska.debian.org
Sun Oct 18 07:03:34 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-avro.
commit 74c9a73fff498056b8620b4432974a02080bf566
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Sat Oct 17 17:03:20 2015 -0700
prepare python2 sources before building
The upstream build system does some preprocessing of the sources
in the python2 package.
---
debian/control | 1 +
debian/rules | 23 ++++++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index ccf7a6d..88cfffd 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
Uploaders: Afif Elghraoui <afif at ghraoui.name>
Build-Depends:
debhelper (>= 9),
+ ant,
dh-python,
python-all,
python-setuptools,
diff --git a/debian/rules b/debian/rules
index 86ec3ba..d49e035 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,12 +9,21 @@ export PYBUILD_NAME = avro
export LC_ALL=C.UTF-8
+# The original sources have to be preprocessed by ant before we
+# we can use them to actually build
+export PYBUILD_BEFORE_CONFIGURE_python2 = ant build
+py2srcdir=lang/py
+py2blddir=lang/py/build
+
+py2dir=$(py2blddir)
+
+clean: py2dir=$(py2srcdir)
%:
PYBUILD_DISABLE_python3=1 \
dh $@ \
--with python2 \
--buildsystem=pybuild \
- --sourcedirectory=lang/py \
+ --sourcedirectory=$(py2dir) \
--package=python-avro
PYBUILD_DISABLE_python2=1 \
dh $@ \
@@ -22,3 +31,15 @@ export LC_ALL=C.UTF-8
--buildsystem=pybuild \
--sourcedirectory=lang/py3 \
--package=python3-avro
+
+# This is necessary because there's no "dh configure" to allow us
+# to simply set a target-specific variable like was done for "clean"
+override_dh_auto_configure:
+ PYBUILD_DISABLE_python3=1 \
+ dh_auto_configure \
+ --sourcedirectory=$(py2srcdir) \
+ --package=python-avro
+ PYBUILD_DISABLE_python2=1 \
+ dh_auto_configure \
+ --sourcedirectory=lang/py3 \
+ --package=python3-avro
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-avro.git
More information about the debian-med-commit
mailing list