forked from NateShoffner/PySnip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_all.sh
executable file
·39 lines (31 loc) · 959 Bytes
/
build_all.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
#!/bin/sh
cd "$(dirname "$(readlink -f "$(command -v "$0")")")"
if [ -d "venv/" ] && [ ! "x$(command -v python)" == "x$VIRTUAL_ENV/bin/python" ]; then
source ./venv/bin/activate
echo "Using virtualenv"
fi
# any compiled file whatsoever
find . -type f \( \
-name '*.py[cod]' -o -name '*.slo' -o -name '*.lo' -o -name '*.o' \
-o -name '*.so' -o -name '*.dylib' -o -name '*.lai' -o -name '*.la' \
-o -name '*.a' \) \
-not -path "./venv/*" \
-not -path "./build/*" \
-not -path "./enet/*" \
-not -path "./feature_server/scripts/*" | xargs rm -f
# cython autogenerated
rm -f pyspades/bytes.cpp
rm -f pyspades/common.cpp
rm -f pyspades/contained.cpp
rm -f pyspades/loaders.cpp
rm -f pyspades/mapmaker.cpp
rm -f pyspades/packet.cpp
rm -f pyspades/vxl.cpp
rm -f pyspades/world.cpp
rm -f enet/enet.c
# native binaries directories
rm -rf build/
rm -rf enet/build/
python2 build.py build_ext -f --inplace
cd enet
python2 setup.py build_ext -f --inplace