-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathwercker-box.yml
More file actions
133 lines (119 loc) · 3.58 KB
/
wercker-box.yml
File metadata and controls
133 lines (119 loc) · 3.58 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: python-nodejs
version: 0.0.5
inherits: wercker/ubuntu12.04-webessentials@1.0.0
type : main
platform : ubuntu@12.04
description : python box with updated nodejs
keywords:
- python
- nodejs
- npm
- virtualenv
- python 2.7
- python 3.2
- wheel
- ruby
- bundler
packages :
- python@2.7.3
- python@3.2.3
- setuptools@1.3
- pip@1.5.4
- virtualenv@1.11.4
- wheel@0.22.0
- psycopg2
- ruby@2.0.0-p353
script : |
sudo apt-get update
sudo apt-get remove python-virtualenv python-setuptools
sudo apt-get install python-dev python3 python3-dev python3-psycopg2 python-psycopg2
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo python3 ez_setup.py
sudo python2 ez_setup.py
cd /tmp/
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
pip --version
sudo cp /usr/local/bin/pip /usr/local/bin/pip-2.7
sudo rm -rf /usr/local/bin/pip
sudo python3 get-pip.py
sudo cp /usr/local/bin/pip /usr/local/bin/pip-3.2
sudo cp /usr/local/bin/pip-2.7 /usr/local/bin/pip
pip --version
sudo pip-3.2 install virtualenv wheel --upgrade
sudo pip-2.7 install virtualenv wheel --upgrade
sudo chef-solo -c $WERCKER_SOURCE_DIR/solo.rb -j $WERCKER_SOURCE_DIR/solo.json -l debug
pip-3.2 --version
pip-2.7 --version
pip --version
sudo chef-solo -c $WERCKER_SOURCE_DIR/solo.rb -j $WERCKER_SOURCE_DIR/solo.json -l debug
export NODEVERSION=0.10.26
cd $HOME
mkdir nodeinstall
cd nodeinstall
wget http://nodejs.org/dist/v$NODEVERSION/node-v$NODEVERSION.tar.gz
tar xzvf node-v$NODEVERSION.tar.gz
cd node-v$NODEVERSION
./configure
make
sudo make install
cd $HOME
rm -fr nodeinstall
node -v
export RUBYVERSION=2.0.0-p353
sudo apt-get install git zlib1g-dev libreadline-dev libqtwebkit-dev
sudo apt-get remove ruby1.9.1
cd $HOME
mkdir rubyinstall
cd rubyinstall
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-$RUBYVERSION.tar.gz
tar xzvf ruby-$RUBYVERSION.tar.gz
cd ruby-$RUBYVERSION
./configure --with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/include/openssl
make
make test
sudo make install
cd $HOME
rm -fr rubyinstall
echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc
sudo gem install bundler -v "1.3"
echo "RAILS_ENV=test" | sudo tee -a /etc/environment
echo "RACK_ENV=test" | sudo tee -a /etc/environment
box-detect:
priority : 900
version :
detect:
- files:
- requirements.txt
- files:
- setup.py
default-build:
python:
priority : 50
detect:
- default: true
text-to-append: |
# Build definition
build:
# The steps that will be executed on build
steps:
# A step that sets up the python virtual environment
- virtualenv:
name: setup virtual environment
install_wheel: false # Enable wheel to speed up builds (experimental)
# # Use this virtualenv step for python 3.2
# - virtualenv
# name: setup virtual environment
# python_location: /usr/bin/python3.2
# A step that executes `pip install` command.
- pip-install
# # This pip-install clears the local wheel cache
# - pip-install:
# clean_wheel_dir: true
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo python information
code: |
echo "python version $(python --version) running"
echo "pip version $(pip --version) running"