build-pipenv.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. # /////////////////////////////////////////////////////////////////
  3. #
  4. # build-pipenv.sh
  5. # A shell script that creates a virtualenv for Hack font builds
  6. # Copyright 2018 Christopher Simpkins
  7. # MIT License
  8. #
  9. # Usage: ./build-pipenv.sh
  10. #
  11. # /////////////////////////////////////////////////////////////////
  12. if ! which pipenv
  13. then
  14. echo "Unable to detect a pipenv install. Please install with 'pip install pipenv' then repeat your build attempt." 1>&2
  15. exit 1
  16. fi
  17. # create virtualenv and install build dependencies
  18. pipenv install --ignore-pipfile
  19. # test for fontmake install in venv
  20. if ! pipenv run fontmake --version
  21. then
  22. echo "Unable to detect fontmake install with pipenv. Please repeat your build attempt." 1>&2
  23. exit 1
  24. fi
  25. # test for fontTools install in venv
  26. if ! pipenv run python -c "import fontTools"
  27. then
  28. echo "Unable to detect fontTools install with pipenv. Please repeat your build attempt." 1>&2
  29. exit 1
  30. fi
  31. # print environment used for build to std output stream
  32. echo "================================="
  33. echo " PYTHON BUILD ENVIRONMENT"
  34. echo "================================="
  35. echo " "
  36. echo "Python interpreter version:"
  37. pipenv run python --version
  38. echo " "
  39. pipenv graph
  40. echo " "
  41. echo "================================="
  42. echo " "
  43. echo "================================="
  44. echo " "