|
9 | 9 |
|
10 | 10 | <!-- Install virtual environment -->
|
11 | 11 | <target name="venv">
|
12 |
| - <delete dir="venv" quiet="true"/> |
13 |
| - <delete file="poetry.lock" quiet="true"/> |
14 |
| - <exec command="python3 -m venv venv" checkreturn="true" passthru="true"/> |
15 |
| - <exec command="./venv/bin/python -m pip install --upgrade pip" checkreturn="true" passthru="true"/> |
16 |
| - <exec command="./venv/bin/python -m pip install --upgrade poetry" checkreturn="true" passthru="true"/> |
17 |
| - <exec command="./venv/bin/poetry install --no-root" passthru="true" checkreturn="true"/> |
| 12 | + <exec executable="python3" checkreturn="true" passthru="true"> |
| 13 | + <arg value="-m"/> |
| 14 | + <arg value="venv"/> |
| 15 | + <arg value=".venv"/> |
| 16 | + </exec> |
| 17 | + <exec executable="./.venv/bin/python" checkreturn="true" passthru="true"> |
| 18 | + <arg value="-m"/> |
| 19 | + <arg value="pip"/> |
| 20 | + <arg value="install"/> |
| 21 | + <arg value="--upgrade"/> |
| 22 | + <arg value="pip"/> |
| 23 | + </exec> |
| 24 | + <exec executable="./.venv/bin/python" checkreturn="true" passthru="true"> |
| 25 | + <arg value="-m"/> |
| 26 | + <arg value="pip"/> |
| 27 | + <arg value="install"/> |
| 28 | + <arg value="--upgrade"/> |
| 29 | + <arg value="poetry"/> |
| 30 | + </exec> |
| 31 | + <exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true"> |
| 32 | + <arg value="--ansi"/> |
| 33 | + <arg value="lock"/> |
| 34 | + </exec> |
| 35 | + <exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true"> |
| 36 | + <arg value="--ansi"/> |
| 37 | + <arg value="install"/> |
| 38 | + <arg value="--no-root"/> |
| 39 | + </exec> |
| 40 | + <exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true"> |
| 41 | + <arg value="--ansi"/> |
| 42 | + <arg value="show"/> |
| 43 | + <arg value="--outdated"/> |
| 44 | + </exec> |
18 | 45 | </target>
|
19 | 46 |
|
20 | 47 | <!-- Creates a new version/release. -->
|
|
66 | 93 |
|
67 | 94 | <!-- Creates a new distribution using pyproject.toml -->
|
68 | 95 | <target name="dist">
|
69 |
| - <exec command="./venv/bin/poetry build" passthru="true" checkreturn="true"/> |
| 96 | + <exec command="./.venv/bin/poetry build" passthru="true" checkreturn="true"/> |
70 | 97 | </target>
|
71 | 98 |
|
72 | 99 | <!-- Uploads a distribution to PyPI -->
|
73 | 100 | <target name="upload">
|
74 |
| - <exec command="./venv/bin/poetry publish" passthru="true" checkreturn="true"/> |
| 101 | + <exec command="./.venv/bin/poetry publish" passthru="true" checkreturn="true"/> |
75 | 102 | </target>
|
76 | 103 |
|
77 | 104 | <!-- All steps for releasing a new version -->
|
78 | 105 | <target name="release" depends="version,dist,upload"/>
|
79 | 106 |
|
80 | 107 | <!-- Runs all unit tests-->
|
81 | 108 | <target name="unit">
|
82 |
| - <exec command="./venv/bin/python -m coverage run -m unittest discover -s test -p \*Test.py" passthru="true" |
| 109 | + <exec command="./.venv/bin/python -m coverage run -m unittest discover -s test -p \*Test.py" passthru="true" |
83 | 110 | checkreturn="true"/>
|
84 |
| - <exec command="./venv/bin/python -m coverage html" passthru="true" checkreturn="true"/> |
| 111 | + <exec command="./.venv/bin/python -m coverage html" passthru="true" checkreturn="true"/> |
85 | 112 | </target>
|
86 | 113 |
|
87 | 114 | <!-- Default target -->
|
|
0 commit comments