setup_env.sh 931 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # Copyright (c) 2016-present, Facebook, Inc.
  3. # All rights reserved.
  4. #
  5. # This source code is licensed under the license found in the
  6. # LICENSE-examples file in the root directory of this source tree.
  7. #
  8. VIRTUALENV_PATH=$1
  9. VIRTUALENV_VERSION=15.0.1
  10. if [ -d "$VIRTUALENV_PATH" ]; then
  11. echo "Virtual Env already installed"
  12. else
  13. mkdir $VIRTUALENV_PATH
  14. pushd $VIRTUALENV_PATH
  15. curl -L -o virtualenv.tar.gz https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
  16. tar xvfz virtualenv.tar.gz
  17. pushd virtualenv-$VIRTUALENV_VERSION
  18. python setup.py develop
  19. popd
  20. popd
  21. python $VIRTUALENV_PATH/virtualenv-$VIRTUALENV_VERSION/virtualenv.py $VIRTUALENV_PATH
  22. source $VIRTUALENV_PATH/bin/activate
  23. env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
  24. pip install unittest2
  25. pip install autobahntestsuite
  26. fi