2
0

build-pipenv.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. BUILD_PYTHON_VERSION="3.6"
  13. if ! which pipenv
  14. then
  15. echo "Unable to detect a pipenv install. Please install with 'pip install pipenv' then repeat your build attempt." 1>&2
  16. exit 1
  17. fi
  18. # install fontTools and fontmake build dependencies with pipenv
  19. pipenv install --python $BUILD_PYTHON_VERSION --ignore-pipfile fontmake fontTools
  20. # test for fontmake install in venv
  21. if ! pipenv run fontmake --version
  22. then
  23. echo "Unable to detect fontmake install with pipenv. Please repeat your build attempt." 1>&2
  24. exit 1
  25. fi
  26. # test for fontTools install in venv
  27. if ! pipenv run python -c "import fontTools"
  28. then
  29. echo "Unable to detect fontTools install with pipenv. Please repeat your build attempt." 1>&2
  30. exit 1
  31. fi
  32. # print environment used for build to std output stream
  33. echo "================================="
  34. echo " PYTHON BUILD ENVIRONMENT"
  35. echo "================================="
  36. echo " "
  37. echo "Python interpreter version:"
  38. pipenv run python --version
  39. echo " "
  40. pipenv graph
  41. echo " "
  42. echo "================================="
  43. echo " "
  44. echo "================================="
  45. echo " "