587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : build.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="helium-python-builder" xmlns:ivy="antlib:org.apache.ivy.ant"
|
|
24 |
xmlns:contrib="antlib:net.sf.antcontrib">
|
|
25 |
|
|
26 |
<property name="bin.dir" location="${builder.dir}/../build/${ant.project.name}" />
|
|
27 |
<import file="../java/common.ant.xml" />
|
|
28 |
<dirname property="python.builder.dir" file="${ant.file.helium-python-builder}" />
|
|
29 |
<property name="nose.result.dir" location="${module.temp.dir}/xunit/nose" />
|
|
30 |
|
|
31 |
<target name="resolve">
|
588
|
32 |
<mkdir dir="${lib.dir}" />
|
628
|
33 |
<mkdir dir="${lib.dir}/zipsafe" />
|
|
34 |
<mkdir dir="${lib.dir}/zipnotsafe" />
|
|
35 |
<delete dir="${lib.dir}/zipnotsafe" includes="**/*" />
|
|
36 |
|
587
|
37 |
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
|
38 |
|
|
39 |
<!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
|
|
40 |
<ivy:resolve file="${ivy.file}" log="download-only"/>
|
628
|
41 |
<ivy:retrieve pattern="${lib.dir}/zipsafe/[artifact].[ext]" type="egg" log="download-only"/>
|
|
42 |
<ivy:retrieve pattern="${lib.dir}/zipsafe/[artifact].[ext]" type="py" log="download-only"/>
|
|
43 |
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" type="jar" log="download-only"/>
|
587
|
44 |
</target>
|
|
45 |
|
|
46 |
<target name="checkstyle"/>
|
|
47 |
<target name="junit"/>
|
|
48 |
<target name="quality"/>
|
|
49 |
|
|
50 |
<target name="package" depends="clean,resolve">
|
|
51 |
<mkdir dir="${module.bin.dir}" />
|
|
52 |
<exec executable="python" failonerror="true" dir="${basedir}">
|
|
53 |
<env key="PYTHONPATH" path="${python.builder.dir}/lib/setuptools-0.6c11-py2.5.egg" />
|
|
54 |
<arg line="setup.py -q bdist_egg -d ${module.bin.dir}" />
|
|
55 |
</exec>
|
|
56 |
<delete dir="${basedir}/build"/>
|
|
57 |
<delete includeemptydirs="true">
|
|
58 |
<fileset dir="${basedir}/lib" includes="*.egg-info/"/>
|
|
59 |
</delete>
|
|
60 |
<move file="${module.bin.dir}/${ant.project.name}-0.1-py2.6.egg" tofile="${module.bin.dir}/${ant.project.name}.egg" />
|
|
61 |
|
|
62 |
<ivy:publish artifactspattern="${module.bin.dir}/[artifact].[ext]"
|
|
63 |
resolver="local"
|
|
64 |
status="integration"
|
|
65 |
forcedeliver="true"
|
|
66 |
pubrevision="1.0"
|
|
67 |
overwrite="true"
|
|
68 |
/>
|
|
69 |
</target>
|
|
70 |
|
|
71 |
<target name="test">
|
|
72 |
<condition property="target" value="pt" else="unittest">
|
|
73 |
<isset property="nose.args"/>
|
|
74 |
</condition>
|
|
75 |
<mkdir dir="${nose.result.dir}" />
|
|
76 |
<property name="nose.args" value="${basedir}/lib/${ant.project.name}tests ${basedir}/lib/${ant.project.name}cpythontests"/>
|
|
77 |
<exec osfamily="windows" executable="cmd" dir="${basedir}" failonerror="true">
|
|
78 |
<env key="ANT_ARGS" value="-lib ${lib.dir} -lib ${builder.dir}\antlibs" />
|
|
79 |
<env key="JYTHONPATH" value="${builder.dir}\python\lib\jython-2.5-py2.5.egg" />
|
|
80 |
<env key="TEST_DATA" path="${basedir}/tests" />
|
|
81 |
<arg value="/C" />
|
|
82 |
<arg value="${ant.home}\bin\ant.bat -f tests.ant.xml ${target} "-Dbuilder.dir=${builder.dir}" "-Dnose.args=${nose.args}" && exit /b %%ERRORLEVEL%%" />
|
|
83 |
</exec>
|
|
84 |
<exec osfamily="unix" executable="${ant.home}/bin/ant" dir="${basedir}" failonerror="true">
|
|
85 |
<env key="ANT_ARGS" value="-lib ${lib.dir} -lib ${builder.dir}/antlibs" />
|
|
86 |
<env key="JYTHONPATH" value="${builder.dir}/python/lib/jython-2.5-py2.5.egg" />
|
|
87 |
<env key="TEST_DATA" path="${basedir}/tests" />
|
|
88 |
<arg line="-f tests.ant.xml ${target} -Dbuilder.dir=${builder.dir}" />
|
|
89 |
<arg value="-Dnose.args=${nose.args}" />
|
|
90 |
</exec>
|
|
91 |
</target>
|
|
92 |
|
|
93 |
<target name="clean">
|
|
94 |
</target>
|
|
95 |
|
|
96 |
</project>
|