Developing trumpet without vagrant¶
I like to use virtualenvwrapper
sudo apt-get install virtualenvwrapper mkvirtualenv trumpet workon trumpet pip install requests
Development packages are needed to install some of the python packages:
.. code:: sh
sudo apt-get install libpq-dev python-dev libjpeg62-dev libpng12-dev libfreetype6-dev liblcms1-dev python-requests libxml2-dev libxslt1-dev libssl-dev
Next we have to download build and prepare the static resources.
Make sure rubygems is on your system:
sudo apt-get install rubygems
Setup local gem environment:
mkdir -p ~/local/gems
Add to ~/.bashrc:
#setup gems if directory exists if [ -d ~/local/gems ]; then export GEM_HOME=~/local/gems export PATH=~/local/gems/bin:$PATH fi
Source the bashrc or spawn another shell and install the gems:
gem install sass -v 3.2.18 gem install compass -v 0.12.2 gem install susy -v 1.0.9 gem install sassy-buttons -v 0.2.6 gem install bootstrap-sass -v 184.108.40.206 gem install compass-ui -v 0.0.5
FIXME: Need better instructions for nodeenv.
Get nodejs for virtualenv¶
workon trumpet pip install nodeenv nodeenv -p
The last statement will download the latest stable version of nodejs and build it in the python virtual environment so that both virtual environments can be integrated together.
Install global nodejs packages¶
Then, install these packages globally:
npm install -g coffee-script npm install -g grunt-cli npm install -g bower
Get packages for grunt¶
In the project directory, get the packages for grunt:
Get bower components¶
Then install the bower packages:
Bower packages can contain whole git repositories, which can be excessive when deploying a python package of static resources. I have written a script that helps to deploy only what is needed from the bower components. The script is not very smart, but handles any bower package that points to a single file, or list of files very well.
python setup.py (develop/install/sdist)