forked from equinor/komodo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-py.sh
executable file
·48 lines (43 loc) · 978 Bytes
/
setup-py.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
46
47
48
#!/bin/bash
set -e
while test $# -gt 0; do
case "$1" in
--cmake)
shift
export CMAKE_EXEC=$1
;;
--jobs)
shift
export JOBS=$1
;;
--prefix)
shift
export PREFIX=$1
;;
--python)
shift
export PYTHON=$1
;;
--fakeroot)
shift
export FAKEROOT=$1
;;
--requirement)
shift
export REQ=$1
;;
*)
export OPTS="$OPTS $1"
;;
esac
shift
done
PYTHONEXECUTABLE=$PREFIX/bin/python
if [ -n "$REQ" ]; then
pip install \
--global-option build --global-option=--executable=$PYTHONEXECUTABLE \
--root $FAKEROOT \
--requirement $REQ --prefix $PREFIX
fi
python setup.py build --executable $PYTHONEXECUTABLE \
install --prefix $PREFIX --root $FAKEROOT