blob: 4d4a5a7487827177a2432a68d25042f9481c26e3 (
plain)
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
|
#!/bin/sh
set -e
if [ -f /etc/debian_version ]; then
for package in python3-pip python3-dev python3-xmltodict python3-pika libevent-dev libxml2-dev libxslt-dev zlib1g-dev; do
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required DEB packages. Installing via sudo." 1>&2
sudo apt-get -y install $missing
fi
fi
if [ -f /etc/redhat-release ]; then
for package in python3-pip python3-devel python3-xmltodict python3-pika libevent-devel libxml2-devel libxslt-devel zlib-devel; do
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required RPM packages. Installing via sudo." 1>&2
sudo yum -y install $missing
fi
fi
python3 -m venv --system-site-packages virtualenv
# avoid pip bugs
./virtualenv/bin/pip install --upgrade pip
#pip3 install --upgrade setuptools cffi # address pip issue: https://github.com/pypa/pip/issues/6264
# work-around change in pip 1.5
#./virtualenv/bin/pip install six
#./virtualenv/bin/pip install -I nose
#./virtualenv/bin/pip install setuptools
./virtualenv/bin/pip install -U -r requirements.txt
# forbid setuptools from using the network because it'll try to use
# easy_install, and we really wanted pip; next line will fail if pip
# requirements.txt does not match setup.py requirements -- sucky but
# good enough for now
./virtualenv/bin/python setup.py develop
|