[med-svn] [python-avro] 10/14: Allow package to build using external dependencies

Afif Elghraoui afif-guest at moszumanska.debian.org
Sun Oct 25 00:46:24 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 bbba5a3c397e0c47bfa868e7a84c1fb87d407707
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Sat Oct 24 17:34:17 2015 -0700

    Allow package to build using external dependencies
---
 debian/control                             |  1 +
 debian/patches/external-dependencies.patch | 68 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 debian/rules                               |  1 +
 4 files changed, 71 insertions(+)

diff --git a/debian/control b/debian/control
index 43f30e4..3ab74ed 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),
+	default-jdk,
 	ant,
 	dh-python,
 	python-all,
diff --git a/debian/patches/external-dependencies.patch b/debian/patches/external-dependencies.patch
new file mode 100644
index 0000000..466dc9b
--- /dev/null
+++ b/debian/patches/external-dependencies.patch
@@ -0,0 +1,68 @@
+Description: Set CLASSPATH to find external dependencies
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-10-24
+--- python-avro.orig/lang/py/build.xml
++++ python-avro/lang/py/build.xml
+@@ -33,19 +33,15 @@
+   <!-- Python implementation directories -->
+   <property name="build.dir" value="${basedir}/build"/>
+   <property name="src.dir" value="${basedir}/src"/>
+-  <property name="lib.dir" value="${basedir}/lib"/>
+   <property name="test.dir" value="${basedir}/test"/>
+ 
+-  <property name="ivy.version" value="2.2.0"/>
+-  <property name="ivy.jar" value="${basedir}/lib/ivy-${ivy.version}.jar"/>
+-
+   <!-- Load shared properties -->
+   <loadfile srcFile="${share.dir}/VERSION.txt" property="avro.version" />
+   <loadfile srcFile="${share.schema.dir}/org/apache/avro/ipc/HandshakeRequest.avsc" property="handshake.request.json"/>
+   <loadfile srcFile="${share.schema.dir}/org/apache/avro/ipc/HandshakeResponse.avsc" property="handshake.response.json"/>
+ 
+   <path id="java.classpath">
+-    <fileset dir="lib">
++    <fileset dir="/usr/share/java">
+       <include name="**/*.jar" />
+     </fileset>
+   </path>
+@@ -58,19 +54,8 @@
+ 
+   <target name="init" description="Create the build directory.">
+     <mkdir dir="${build.dir}"/>
+-    <available file="${ivy.jar}" property="ivy.jar.found"/>
+-    <antcall target="ivy-download"/>
+-    <typedef uri="antlib:org.apache.ivy.ant">
+-      <classpath>
+-        <pathelement location="${ivy.jar}" />
+-      </classpath>
+-    </typedef>
+   </target>
+   
+-  <target name="ivy-download" unless="ivy.jar.found" >
+-    <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${ivy.jar}" usetimestamp="true" />
+-  </target>
+-
+   <target name="build"
+           description="Copy project files to build/ and do string replacement."
+           depends="init">
+@@ -87,9 +72,6 @@
+         <exclude name="**/*.py~"/>
+       </fileset> 
+     </copy>
+-    <copy todir="${build.dir}/lib">
+-      <fileset dir="${lib.dir}" />
+-    </copy>
+ 
+     <!--Copy the protocols used for tethering -->
+     <copy todir="${build.dir}/src/avro/tether">
+@@ -141,10 +123,6 @@
+       </filterset>
+     </copy>
+ 
+-    <!-- Ensure we have a local copy of the tools jar -->
+-    <ivy:retrieve
+-        pattern="${basedir}/../java/tools/target/[artifact]-[revision].[ext]"/>
+-
+     <!-- Inline the location of the tools jar -->
+     <copy file="${test.dir}/test_tether_word_count.py"
+           toFile="${build.dir}/test/test_tether_word_count.py"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fcb7adf
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+external-dependencies.patch
diff --git a/debian/rules b/debian/rules
index f8d20da..83956e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,7 @@ include /usr/share/dpkg/default.mk
 export PYBUILD_NAME = avro
 
 export LC_ALL=C.UTF-8
+export JAVA_HOME=/usr/lib/jvm/default-java
 
 # The original sources have to be preprocessed by ant before we
 # we can use them to actually build

-- 
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