forked from makerbot/s3g
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-dev.sh
executable file
·51 lines (41 loc) · 1.46 KB
/
setup-dev.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
#!/bin/bash
PYVERSION=$1
ENV_DIR=$2
BASEDIR=`echo $0|sed 's|/.*||'`
EGGDIR=$BASEDIR/submodule/conveyor_bins/python
ENV_DIR=$4
if [ -z $ENV_DIR ]; then
ENV_DIR=virtualenv
fi
if [ -z $PYVERSION ]
then
PYVERSION=`python -c 'import sys; print ".".join(sys.version.split()[0].split(".")[0:2])'`
echo "python version is $PYVERSION"
else
PYBINVERSION=$PYVERSION
fi
UNAME=`uname`
MAC_DISTUTILS=/System/Library/Frameworks/Python.framework/Versions/$PYVERSION/lib/python$PYVERSION/distutils/__init__.py
if [ "$UNAME" == "Darwin" ]
then
MACVER=`system_profiler SPSoftwareDataType |grep '^ *System Version:' |sed 's/.*OS X //' | sed 's/\(10\.[0-9]\)*.*$/\1/'`
export PATH=$PATH:$BASEDIR/submodule/conveyor_bins/mac/$MACVER
if [ ! -f $MAC_DISTUTILS ]
then
sudo cp mac/$PYVERSION/distutils/__init__.py $MAC_DISTUTILS
fi
fi
if [ ! -d $ENV_DIR ]
then
python$PYBINVERSION virtualenv.py --extra-search-dir=$EGGDIR --never-download --system-site-packages $ENV_DIR
fi
. $ENV_DIR/bin/activate
echo "Upgrading setuptools"
easy_install -q $EGGDIR/setuptools-0.6c11-py$PYVERSION.egg
echo "Installing modules"
easy_install -q $EGGDIR/mock-1.0.1-py$PYVERSION.egg
easy_install -q $EGGDIR/argparse-1.2.1-py$PYVERSION.egg
easy_install -q $EGGDIR/unittest2-0.5.1-py$PYVERSION.egg
pip install -q --use-mirrors coverage doxypy python-daemon unittest-xml-reporting
echo "Installing pyserial egg"
easy_install -q $BASEDIR/../pyserial/dist/pyserial-2.7_mb2.1-py$PYVERSION.egg