-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildsystem.sh
executable file
·45 lines (35 loc) · 1.06 KB
/
buildsystem.sh
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
#!/bin/sh
set -e
BASE_DIR="$( cd "$( dirname "$0" )" && pwd )"
VENV_DIR="${BASE_DIR}/.venv"
rm -rf "${BASE_DIR}/.pytest_cache"
rm -rf "${VENV_DIR}"
rm -rf "${BASE_DIR}/build"
rm -rf "${BASE_DIR}/dist"
rm -rf "${BASE_DIR}/src/wortsalat.egg-info"
rm -rf "${BASE_DIR}/test/__pycache__"
echo "##############################"
echo "### 1. Create a new venv ###"
echo "##############################"
if python3 -m venv "${VENV_DIR}";
then
echo "Venv Created"
else
echo "Could not create venv"
exit 1
fi
. $VENV_DIR/bin/activate
echo "##############################"
echo "### 2. Build the library ###"
echo "##############################"
python3 -m pip install build
python3 -m build --wheel
echo "##############################"
echo "### 3. Install the Library ###"
echo "##############################"
python3 -m pip install "${BASE_DIR}/dist/wortsalat-0.0.3-py3-none-any.whl"
echo "##############################"
echo "### 4. Start the tests ###"
echo "##############################"
python3 -m pip install pytest
python3 -m pytest "${BASE_DIR}/tests/"