8000 Bugfix: Only on archlinux need install distribute==0.6.29 · lcppcl/code@f288518 · GitHub
[go: up one dir, main page]

Skip to content

Commit f288518

Browse files
committed
Bugfix: Only on archlinux need install distribute==0.6.29
1 parent 28947a8 commit f288518

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ You only to excute:
2626
bash <(curl -s https://raw.github.com/douban/code/master/scripts/install_code.sh)
2727
```
2828

29+
Notes: The install script in `code/scripts` subdirectory, for example ubuntu/debian,
30+
You can see `code/scripts/ubuntu.sh`
31+
2932
Prepare
3033
-------
3134
- mysql # default port

scripts/centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "Install needed package.This may take some time..."
77
sudo yum install -y -q git python-virtualenv python-devel memcached gcc gcc-c++
88

99
echo "Install mysql..."
10-
sudo yum install mysql-server mysql
10+
sudo yum install -y -q mysql-server mysql mysql-devel
1111
sudo /etc/init.d/mysqld start
1212

1313
echo "Setup memcached port to 11311..."

scripts/common.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ modify_sudo_time() {
44
}
55

66
install_libmemcached() {
7-
wget -c https://github.com/xtao/douban-patched/raw/master/libmemcached-douban-1.0.18.tar.gz
8-
tar zxf libmemcached-douban-1.0.18.tar.gz
9-
cd libmemcached-1.0.18
10-
./configure && make && sudo make install
11-
cd ..
12-
rm -rf python-libmemcached
13-
rm -rf libmemcached*
14-
sudo /sbin/ldconfig
7+
#check libmemcached has installed
8+
if [ ! -f /usr/local/bin/memping ] ; then
9+
curl -L https://github.com/xtao/douban-patched/raw/master/libmemcached-douban-1.0.18.tar.gz |tar zx
10+
cd libmemcached-1.0.18
11+
./configure && make && sudo make install
12+
cd ..
13+
rm -rf libmemcached-1.0.18
14+
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf
15+
sudo /sbin/ldconfig
16+
fi
1517
}
1618

1719
check_virtualenv() {
@@ -46,7 +48,9 @@ install_code() {
4648
. venv/bin/activate
4749
pip install cython # should install first
4850
pip install -U setuptools # python-libmemcached require updated setuptools
49-
pip install "distribute==0.6.29" # Fixed install MySQL-python for #14
51+
if [ -f /etc/arch-release ] ; then
52+
pip install "distribute==0.6.29" # Fixed install MySQL-python on archlinux for #14
53+
fi
5054
pip install -r requirements.txt
5155
}
5256

scripts/fedora.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "Install needed package.This may take some time..."
77
sudo yum install -y -q git python-virtualenv python-devel memcached gcc gcc-c++
88

99
echo "Install mysql..."
10-
sudo yum install mysql-server mysql
10+
sudo yum install mysql-server mysql mysql-devel
1111
#fedora only this method
1212
sudo service mysqld start
1313

scripts/install_code.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# Check Python version > 2.7
4+
test `python -c 'import sys; print sys.version_info < (2, 7)'` = "True" && echo 'CODE requires Python 2.7.'; exit 1
5+
36
url='https://raw.github.com/douban/code/master/scripts'
47

58
if [ -f /etc/fedora-release ] ; then

0 commit comments

Comments
 (0)
0