blob: 79f41dd7fab1c03487aba88d34f88fc32dde2f02 [file] [log] [blame]
Guillaume Valadon6317ba02016-05-23 16:19:25 +02001# Install dependencies using pip
2if [ -z $TRAVIS_SUDO ] && [ "$TRAVIS_OS_NAME" = "osx" ]
3then
4 PIP_INSTALL_FLAGS="--user"
5fi
Daniel Collins620f1952016-10-26 01:03:37 -07006$TRAVIS_SUDO pip install $PIP_INSTALL_FLAGS ecdsa mock
7
8# Pycrypto 2.7a1 isn't available on PyPi
9if [ "$TEST_COMBINED_MODES" = "yes" ]
10then
11 curl -sL https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz | tar xz
12 cd pycrypto-2.7a1
13 python setup.py build
14 $TRAVIS_SUDO python setup.py install
15else
16 $TRAVIS_SUDO pip install $PIP_INSTALL_FLAGS pycrypto
17fi
Guillaume Valadon6317ba02016-05-23 16:19:25 +020018
19# Install pcap & dnet
20if [ ! -z $SCAPY_USE_PCAPDNET ]
21then
22 if [ "$TRAVIS_OS_NAME" = "linux" ]
23 then
Guillaume Valadon5b5bd112016-08-12 13:36:08 +020024 $TRAVIS_SUDO apt-get install python-libpcap python-dumbnet
Guillaume Valadon6317ba02016-05-23 16:19:25 +020025 elif [ "$TRAVIS_OS_NAME" = "osx" ]
26 then
27 mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages
28 echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth
29
30 brew update
31 brew install --with-python libdnet
32 brew install .travis/pylibpcap.rb
33 fi
34fi