buildframework/helium/builder/python/macros.ant.xml
author wbernard
Thu, 22 Jul 2010 17:09:34 +0300
branchhelium-9.0
changeset 619 f5b4d1b4622d
parent 587 85df38eb4012
child 588 c7c26511138f
permissions -rw-r--r--
Added tag helium-9.0.5 for changeset df88fead2976
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">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
        <ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
        <!-- 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
    35
        <ivy:resolve file="${ivy.file}" log="download-only"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
        <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" log="download-only"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
    <target name="checkstyle"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    <target name="junit"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    <target name="quality"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    <target name="package" depends="clean,resolve">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
        <mkdir dir="${module.bin.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
        <exec executable="python" failonerror="true" dir="${basedir}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
            <env key="PYTHONPATH" path="${python.builder.dir}/lib/setuptools-0.6c11-py2.5.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
            <arg line="setup.py -q bdist_egg -d ${module.bin.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
        <delete dir="${basedir}/build"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
        <delete includeemptydirs="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
            <fileset dir="${basedir}/lib" includes="*.egg-info/"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
        </delete>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
        <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
    54
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
        <ivy:publish artifactspattern="${module.bin.dir}/[artifact].[ext]" 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
                        resolver="local"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
                        status="integration"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
                        forcedeliver="true"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
                        pubrevision="1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
                        overwrite="true"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
    <target name="test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
        <condition property="target" value="pt" else="unittest">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
            <isset property="nose.args"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
        </condition>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
        <mkdir dir="${nose.result.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
        <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
    70
        <exec osfamily="windows" executable="cmd" dir="${basedir}" failonerror="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
            <env key="ANT_ARGS" value="-lib ${lib.dir} -lib ${builder.dir}\antlibs" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
            <env key="JYTHONPATH" value="${builder.dir}\python\lib\jython-2.5-py2.5.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
            <env key="TEST_DATA" path="${basedir}/tests" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
            <arg value="/C" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
            <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
    76
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
        <exec osfamily="unix" executable="${ant.home}/bin/ant" dir="${basedir}" failonerror="true">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
            <env key="ANT_ARGS" value="-lib ${lib.dir} -lib ${builder.dir}/antlibs" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
            <env key="JYTHONPATH" value="${builder.dir}/python/lib/jython-2.5-py2.5.egg" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
            <env key="TEST_DATA" path="${basedir}/tests" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
            <arg line="-f tests.ant.xml ${target} -Dbuilder.dir=${builder.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
            <arg value="-Dnose.args=${nose.args}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
        </exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
    </target>  
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
    <target name="clean">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
</project>