Changed bootstrap & dev.env to prep for sharding deployment.

This commit is contained in:
Sugu Sougoumarane 2012-06-03 22:24:54 -07:00
Родитель 3aee0efca2
Коммит 15afcc167f
5 изменённых файлов: 33 добавлений и 29 удалений

Просмотреть файл

@ -34,14 +34,14 @@ if [ ! -f bootstrap.sh ]; then
exit 1
fi
if [ ! -d dist ]; then
mkdir dist
fi
. ./dev.env
if [ ! -d $VTROOT/dist ]; then
mkdir $VTROOT/dist
fi
#install bson
bson_dist=$VTTOP/dist/py-vt-bson-0.3.2
bson_dist=$VTROOT/dist/py-vt-bson-0.3.2
if [ -d $bson_dist ]; then
echo "skipping bson python build"
else
@ -49,4 +49,13 @@ else
python ./setup.py install --prefix=$bson_dist
fi
#install vtdb
vtdb_dist=$VTROOT/dist/py-vtdb
if [ -d $vtdb_dist ]; then
echo "skipping vtdb build"
else
cd $VTTOP/py && \
python ./setup.py install --prefix=$vtdb_dist
fi
echo "source dev.env in your shell to complete the setup."

29
dev.env
Просмотреть файл

@ -27,42 +27,37 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
export _PYTHONPATH=${_PYTHONPATH-$PYTHONPATH}
export VTTOP=$(pwd)
VT_GOPATH="${VTTOP/src\/code.google.com\/p\/vitess/}"
export VTROOT="${VTTOP/src\/code.google.com\/p\/vitess/}"
# VTTOP sanity check
if [[ "$VTTOP" == "$VT_GOPATH" ]]; then
if [[ "$VTTOP" == "$VTROOT" ]]; then
echo "WARNING: VTTOP($VTTOP) does not contain src/code.google.com/p/vitess"
fi
export GOTOP=$VTTOP/go
export PYTOP=$VTTOP/py
export PYTHONPATH="$PYTOP:$_PYTHONPATH"
for pypath in $(find $VTTOP/dist -name site-packages)
for pypath in $(find $VTROOT/dist -name site-packages)
do
export PYTHONPATH=$pypath:$PYTHONPATH
done
# mysql config vars. Please set based on your environment
# Build will not work without these settings
#export MYSQL_CONFIG=/usr/local/bin/mysql_config
#export LD_LIBRARY_PATH=/usr/local/lib
# Build will not work if these settings are incorrect.
export MYSQL_CONFIG=${MYSQL_CONFIG:-/usr/local/bin/mysql_config}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-/usr/local/lib}
export CGO_CFLAGS="$($MYSQL_CONFIG --cflags) -ggdb -fPIC"
export CGO_LDFLAGS="$($MYSQL_CONFIG --libs_r)"
# Useful aliases. Uncomment if you like them.
#alias gt="cd $GOTOP"
#alias pt="cd $PYTOP"
#alias vt="cd $VTTOP"
# Useful aliases. Remove if inconvenient.
alias gt="cd $GOTOP"
alias pt="cd $PYTOP"
alias vt="cd $VTTOP"
# GOPATH sanity check
if [[ "$GOPATH" == "${GOPATH/${VTTOP%/src/code.google.com/p/vitess}//}" ]]; then
echo "Adding $VT_GOPATH to GOPATH"
if [[ "$GOPATH" ]]; then
export GOPATH="$GOPATH:$VT_GOPATH"
export GOPATH="$GOPATH:$VTROOT"
else
export GOPATH="$VT_GOPATH"
export GOPATH="$VTROOT"
fi
fi

Просмотреть файл

@ -1,7 +1,7 @@
from vtdb import vt_occ2 as db
from vttest import framework
from vttest import cache_cases
import framework
import cache_cases
class TestCache(framework.TestCase):
def setUp(self):

Просмотреть файл

@ -2,8 +2,8 @@ import time
from vtdb import vt_occ2 as db
from vttest import framework
from vttest import nocache_cases
import framework
import nocache_cases
class TestNocache(framework.TestCase):
def setUp(self):

Просмотреть файл

@ -41,9 +41,9 @@ import MySQLdb as mysql
from vtdb import vt_occ2 as db
from vtdb import dbexceptions
from vttest import framework
from vttest import cache_tests
from vttest import nocache_tests
import framework
import cache_tests
import nocache_tests
parser = optparse.OptionParser(usage="usage: %prog [options]")
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False)