-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpysetup.sh
executable file
·77 lines (72 loc) · 1.68 KB
/
pysetup.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
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
#!/bin/bash
#
#
# if no args given, print help
#
if [[ $# == 0 ]]; then
echo "This script will run \"python setup.py...\" in all python packages of myami."
echo "Please specify the command line arguments that you want to pass to setup.py."
echo ""
echo "For example, if you want to run \"python setup.py install\" on all packages:"
echo " $0 install"
echo ""
echo "Or, if you want to run \"python setup.py build\":"
echo " $0 build"
echo ""
echo "You can give any options accepted by setup.py, such as:"
echo " $0 install --prefix=/home/user/myinstallpath"
echo ""
exit;
fi
#
# Configuration variables
#
myamidir=`pwd`
logfile=$myamidir/pysetup.log
#
# These are python packages that we want to process using
# "python setup.py ..."
#
# leaving out appion for now, since it has a lot of scripts that could
# clutter up /usr/bin/
#
packages=(
pyami
sinedon
redux
imageviewer
leginon
pyscope
slack
myami_test
modules/radermacher
modules/libcv
modules/numextension
modules/jenks-master
)
#
# log general info
#
echo "Log file: "$logfile
echo "" >> $logfile
echo "######################################" >> $logfile
echo "myami python setup log" >> $logfile
date >> $logfile
echo "######################################" >> $logfile
#
# process each package
#
for package in ${packages[@]}; do
echo -n "processing "$package"..."
echo "" >> $logfile
echo "########################" >> $logfile
echo "processing "$package >> $logfile
echo "########################" >> $logfile
cd $myamidir/$package
echo "python setup.py $@" >> $logfile
if python setup.py $@ >>$logfile 2>&1;
then echo " ok.";
else echo " *************FAILED!!! (see log for details)";
fi
done
cd $myamidir