forked from metaist/pdfmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
116 lines (100 loc) · 3.67 KB
/
build.xml
File metadata and controls
116 lines (100 loc) · 3.67 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<project name="pdfmerge" default="all">
<property name="project.package" value="${ant.project.name}" />
<condition property="os.win">
<os family="windows" />
</condition>
<!-- Executables -->
<condition property="bin.ext" value=".bat" else="">
<os family="windows" />
</condition>
<property name="bin.inno" value="iscc" />
<property name="bin.nose" value="nosetests" />
<property name="bin.pep8" value="pep8" />
<property name="bin.pip" value="pip" />
<!--property name="bin.pylint" value="pylint${bin.ext}" /-->
<property name="bin.pylint" value="pylint" />
<property name="bin.python" value="python" />
<!-- Files / Directories -->
<fileset id="files.python" dir="." includes="**/*.py" />
<!-- Targets -->
<target name="all" depends="clean,resolve,test,build"
description="clean, test, and build the system" />
<!-- Cleaning -->
<target name="clean" description="remove generated files">
<delete verbose="true" quiet="true" failonerror="false"
includeemptydirs="true">
<fileset dir="." includes="**/*.pyc" defaultexcludes="false" />
<fileset dir="." includes="**/*.*~" defaultexcludes="false" />
<fileset dir="." includes="MANIFEST" />
<fileset dir="." includes="dist/" />
<fileset dir="." includes="build/" />
</delete>
</target>
<!-- Dependencies -->
<target name="resolve" description="download dependencies">
<exec executable="${bin.pip}" failonerror="true">
<arg value="install" />
<arg value="-r"/>
<arg value="requirements.txt"/>
</exec>
</target>
<!-- Testing -->
<target name="test" depends="nose,pep8,pylint"
description="run unit and static tests" />
<target name="nose" description="run unit tests using nosetests">
<exec executable="${bin.nose}" failonerror="true">
<arg value="--with-doctest" />
<arg value="--with-coverage"/>
<arg value="--cover-package=${project.package}"/>
</exec>
</target>
<target name="pep8" description="run pep8 static checker">
<apply executable="${bin.pep8}" failonerror="true">
<fileset refid="files.python" />
</apply>
</target>
<target name="pylint" description="run pylint static checker">
<exec executable="${bin.pylint}" failonerror="true">
<arg value="${project.package}" />
<arg value="--rcfile=.pylint.ini" />
</exec>
</target>
<!-- Build -->
<target name="build" description="build a release">
<exec executable="${bin.python}" failonerror="true">
<arg value="setup.py" />
<arg value="sdist" />
</exec>
</target>
<target name="win" depends="py2exe,inno" if="os.win"
description="build a Windows executable and installer"></target>
<target name="py2exe" if="os.win"
description="build a Windows executable">
<exec executable="${bin.python}" failonerror="true">
<arg value="setup.py" />
<arg value="py2exe" />
</exec>
</target>
<target name="inno" if="os.win"
description="build a Windows installer using Inno Setup">
<exec executable="${bin.inno}" failonerror="true">
<arg value="installer\${project.package}.iss" />
</exec>
</target>
<!-- Distribution -->
<target name="install" description="install the library">
<exec executable="${bin.python}" failonerror="true">
<arg value="setup.py" />
<arg value="install" />
</exec>
</target>
<target name="pypi" description="push release to PyPI">
<exec executable="${bin.python}" failonerror="true">
<arg value="setup.py" />
<arg value="register" />
<arg value="sdist" />
<arg value="upload" />
</exec>
</target>
</project>