Skip to content

Commit fe6e6ba

Browse files
committed
[build-pipenv.sh] added new shell script that supports builds of venv with pinned Python package versions using pipenv
1 parent 384f3fa commit fe6e6ba

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

build-pipenv.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/sh
2+
3+
# /////////////////////////////////////////////////////////////////
4+
#
5+
# build-pipenv.sh
6+
# A shell script that creates a virtualenv for Hack font builds
7+
# Copyright 2018 Christopher Simpkins
8+
# MIT License
9+
#
10+
# Usage: ./build-pipenv.sh
11+
#
12+
# /////////////////////////////////////////////////////////////////
13+
14+
if ! which pipenv
15+
then
16+
echo "Unable to detect a pipenv install. Please install with `pip install pipenv` then repeat your build attempt." 1>&2
17+
exit 1
18+
done
19+
20+
# install fontTools and fontmake build dependencies with pipenv
21+
pipenv install --ignore-pipfile fontmake fontTools
22+
23+
# test for fontmake install in venv
24+
if ! pipenv run fontmake --version
25+
then
26+
echo "Unable to detect fontmake install with pipenv. Please repeat your build attempt." 1>&2
27+
exit 1
28+
done
29+
30+
# test for fontTools install in venv
31+
if ! pipenv run python -c "import fontTools"
32+
then
33+
echo "Unable to detect fontTools install with pipenv. Please repeat your build attempt." 1>&2
34+
exit 1
35+
done
36+
37+
# print environment used for build to std output stream
38+
39+
echo "================================="
40+
echo " BUILD ENVIRONMENT"
41+
echo "================================="
42+
echo " "
43+
44+
pipenv graph
45+
46+
echo " "
47+
echo "================================="
48+
echo " END BUILD ENVIRONMENT"
49+
echo "================================="
50+
echo " "

0 commit comments

Comments
 (0)