-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.xml
76 lines (64 loc) · 2.07 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!--
# Modbus TestKit: Implementation of Modbus protocol in python
#
# (C)2009 - Luc Jean - luc.jean@gmail.com
# (C)2009 - Apidev - http://www.apidev.fr
#
# This is distributed under GNU LGPL license, see license.txt
-->
<project name="modbus-tk" default="move_zip">
<taskdef resource="pyAntTasks.properties"/>
<property name="src.dir" value="modbus_tk"/>
<property name="tools.dir" value="tools"/>
<property name="pydoc.dir" value="docs"/>
<property name="test.dir" value="tests"/>
<property name="version" value="0.4.2"/>
<property name="release.dir" value="release"/>
<target name="init">
<delete dir="${pydoc.dir}"/>
<mkdir dir="${pydoc.dir}"/>
<mkdir dir="${release.dir}"/>
</target>
<target name="compile">
<py-compile dir="." pythonpath="." optimize="0"/>
</target>
<!--
<target name="pydoc" depends="init,compile">
<py-doc pythonpath="${src.dir}" destdir="${pydoc.dir}">
<fileset dir="${src.dir}">
<include name="**/*"/>
</fileset>
</py-doc>
</target>
-->
<target name="pydoc" depends="init,compile">
<py-run script="C:\Python26\Scripts\epydoc.py">
<arg value="--config=build-epydoc.cfg"/>
</py-run>
</target>
<target name="install" depends="compile">
<py-run script="setup.py" pythonpath="${src.dir}" optimize="0">
<arg value="install"/>
</py-run>
</target>
<target name="unittests" depends="install">
<py-test pythonpath="${src.dir}" dir="${test.dir}">
<fileset dir="${test.dir}">
<include name="**/unittest_*.py"/>
</fileset>
</py-test>
</target>
<target name="alltests" depends="install">
<py-test pythonpath="${src.dir}" dir="${test.dir}">
<fileset dir="${test.dir}">
<include name="**/*test*.py"/>
</fileset>
</py-test>
</target>
<target name="zip" depends="unittests,pydoc">
<py-run script="${tools.dir}/zip_module.py" pythonpath="${tools.dir}" optimize="0" />
</target>
<target name="move_zip" depends="zip">
<move file="${tools.dir}\modbus-tk.zip" tofile="${release.dir}\modbus-tk-${version}.zip"/>
</target>
</project>