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