2018-02-16 16:42:47 +00:00
|
|
|
# Detect the pip version
|
2017-12-05 09:07:32 +00:00
|
|
|
PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) || (python --version 2>&1 | grep -q 'Python 3' && which pip3)`
|
2017-12-05 09:07:26 +00:00
|
|
|
|
2018-02-16 16:42:47 +00:00
|
|
|
if [ ! -z "$TOXENV" ]
|
2018-01-31 13:34:57 +00:00
|
|
|
then
|
2018-02-16 16:42:47 +00:00
|
|
|
# Install Python3 on osx
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ] && ! python3
|
|
|
|
then
|
|
|
|
brew upgrade python
|
|
|
|
pip3 install tox
|
2018-04-12 13:36:26 +00:00
|
|
|
if [ ! -z $SCAPY_USE_PCAPDNET ]
|
|
|
|
then
|
|
|
|
brew update
|
|
|
|
brew install libdnet libpcap
|
|
|
|
fi
|
2018-02-16 16:42:47 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install wireshark data
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_SUDO" = "true" ]
|
|
|
|
then
|
|
|
|
sudo apt-get -qy install tshark
|
2018-04-05 19:37:51 +00:00
|
|
|
sudo apt-get -qy install can-utils build-essential linux-headers-$(uname -r);
|
2018-02-16 16:42:47 +00:00
|
|
|
fi
|
|
|
|
|
2018-04-12 13:36:26 +00:00
|
|
|
# Install pcap & dnet
|
|
|
|
if [ ! -z $SCAPY_USE_PCAPDNET ] && [ "$TRAVIS_OS_NAME" = "linux" ]
|
|
|
|
then
|
|
|
|
$SCAPY_SUDO apt-get -qy install libdumbnet-dev libpcap-dev
|
|
|
|
fi
|
|
|
|
|
2018-02-16 16:42:47 +00:00
|
|
|
# Make sure tox is installed and up to date
|
|
|
|
$PIP install -U tox
|
|
|
|
|
|
|
|
# Stop here when using tox
|
2018-01-31 13:34:57 +00:00
|
|
|
exit 0
|
|
|
|
fi
|