blob: 5bef22847bf435c44e4ab8f3eb3bfe83d06c4dda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/sh
# Update preflight libs (assumes a pyenv approach)
# Copyright (c) 2023, SIL International (https://www.sil.org)
# Released under the MIT License (https://opensource.org/licenses/MIT)
# maintained by Nicolas Spalinger
echo "Update preflight libs pyenv - version 2023-10-19"
# checking we have pyenv installed
if ! [ -x "$(command -v pyenv)" ]; then
echo 'Error: pyenv is not installed. Check the workflow doc for details. '
exit 0
fi
echo ""
echo "Active python version and location (via pyenv):"
pyenv version
which python3
echo ""
echo "Installing/Updating pip"
python3 -m pip install --upgrade pip setuptools wheel setuptools_scm
echo ""
echo "Populating/updating the preflight dependencies for the active pyenv interpreter"
# components in editable mode:
# (with source at the root of the user's home directory so that src/ folders don't appear anywhere else)
python3 -m pip install -e git+https://github.com/silnrsi/pysilfont.git#egg=silfont --src "$HOME"/src
# components from main/master directly from upstream git repositories
python3 -m pip install git+https://github.com/silnrsi/palaso-python.git git+https://github.com/googlefonts/GlyphsLib.git git+https://github.com/fonttools/ufoLib2.git git+https://github.com/fonttools/fonttools.git git+https://github.com/typemytype/glyphConstruction.git git+https://github.com/robotools/fontParts.git --use-pep517
# components from stable releases on pypi
python3 -m pip install fs mutatorMath defcon fontMath lxml
# reload the config file to rehash the path for either bash or zsh
if [ -n "$ZSH_VERSION" ]; then
SHELL_PROFILE="$HOME/.zshrc"
else
SHELL_PROFILE="$HOME/.bash_profile"
fi
if [ -n "$ZSH_VERSION" ]; then
. $SHELL_PROFILE
fi
# conditional to only run psfpreflightversion if the command is really available otherwise output a guidance message
if [ -n "$(command -v psfpreflightversion)" ]; then
psfpreflightversion
else echo "Open a new Terminal and type psfpreflightversion to check paths and versions of the preflight modules"
fi
|