forked from burnash/gspread
-
Notifications
You must be signed in to change notification settings - Fork 2
Installation and test procedure
Martin 'Hasan' Bramwell edited this page Jan 7, 2014
·
18 revisions
These steps explain how to install and test my version of Anton's gspread:
sudo apt-get -y install unzip python-pip python-nose
#
sudo pip install oauth2client virtualenv virtualenvwrapper
export WORKON_HOME=~/.python_vms
mkdir $WORKON_HOME
#
pip completion --bash >> ~/.bashrc
echo "export WORKON_HOME=$WORKON_HOME" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
echo "alias mkvirtualenv='mkvirtualenv --no-site-packages --distribute'" >> ~/.bashrc
echo "export PIP_VIRTUALENV_BASE=$WORKON_HOME" >> ~/.bashrc
source ~/.bashrc
#
mkdir -p projects
cd projects
wget https://github.com/FleetingClouds/gspread/archive/master.zip
unzip master.zip
mv gspread-master gspread
Make a new one:
mkvirtualenv test
Stop using it:
workon test
Use an existing one:
deactivate
Delete one:
rmvirtualenv test
Make a copy of the example configuration
cd /home/yourself/projects/gspread
cp tests/tests.config.example tests/tests.config
Edit the UID/pwd details to begin to access Google Drive. Run the tests, expecting errors:
nosetests
You will see "SpreadsheetNotFound" errors, for nearly all the tests.
Fill in all the remaining details, and test again. Explanations are interspersed with the settings fields.
To use Google OAuth authentication, please follow the instructions, How to get, use and refresh OAuth access tokens for gspread.