summaryrefslogtreecommitdiffstats
path: root/preflight
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-11-21 15:00:40 +0100
committerDaniel Baumann <daniel@debian.org>2024-11-21 15:00:40 +0100
commit012d9cb5faed22cb9b4151569d30cc08563b02d1 (patch)
treefd901b9c231aeb8afa713851f23369fa4a1af2b3 /preflight
parentInitial commit. (diff)
downloadpysilfont-012d9cb5faed22cb9b4151569d30cc08563b02d1.tar.xz
pysilfont-012d9cb5faed22cb9b4151569d30cc08563b02d1.zip
Adding upstream version 1.8.0.upstream/1.8.0upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'preflight')
-rwxr-xr-xpreflight/update-preflight-libs-pyenv52
1 files changed, 52 insertions, 0 deletions
diff --git a/preflight/update-preflight-libs-pyenv b/preflight/update-preflight-libs-pyenv
new file mode 100755
index 0000000..5bef228
--- /dev/null
+++ b/preflight/update-preflight-libs-pyenv
@@ -0,0 +1,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