diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-08-28 19:43:39 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-08-28 19:44:04 +0300 |
commit | 18ba0aee6a280ee808f9279f5f7e57315c3ee073 (patch) | |
tree | d916204cd94d7fa383278556185e19f7c99bc0dc | |
parent | 5ecf53902eb46db2162d1428d38eb175fd743e97 (diff) | |
download | inter-18ba0aee6a280ee808f9279f5f7e57315c3ee073.tar.xz |
upgrade dependencies
-rwxr-xr-x | init.sh | 9 | ||||
-rw-r--r-- | misc/pylib/booleanOperations/requirements.txt | 6 | ||||
-rw-r--r-- | misc/pylib/fontbuild/Build.pyx | 28 | ||||
-rw-r--r-- | misc/pylib/fontbuild/mix.pyx | 12 | ||||
-rw-r--r-- | requirements.txt | 24 |
5 files changed, 48 insertions, 31 deletions
@@ -80,7 +80,9 @@ else } # TODO: allow setting a flag to recreate venv - # rm -rf "$VENV_DIR" + if $clean; then + rm -rf "$VENV_DIR" + fi if [[ ! -d "$VENV_DIR/bin" ]]; then echo "Setting up virtualenv in '$VENV_DIR'" @@ -96,11 +98,13 @@ else UPDATE_TIMESTAMP_FILE="$VENV_DIR/last-pip-run.mark" REQUIREMENTS_FILE=$SRCDIR/requirements.txt + PY_REQUIREMENTS_CHANGED=false if [ "$REQUIREMENTS_FILE" -nt "$UPDATE_TIMESTAMP_FILE" ]; then echo "pip install -r $REQUIREMENTS_FILE" pip install -r "$REQUIREMENTS_FILE" date '+%s' > "$UPDATE_TIMESTAMP_FILE" + PY_REQUIREMENTS_CHANGED=true fi # ———————————————————————————————————————————————————————————————————————————————————————————————— @@ -189,7 +193,7 @@ else DIR=$1 REF_FILE=$DIR/$2 set -e - if $clean || [ ! -f "$REF_FILE" ] || has_newer "$DIR" "$REF_FILE"; then + if $clean || $PY_REQUIREMENTS_CHANGED || [ ! -f "$REF_FILE" ] || has_newer "$DIR" "$REF_FILE"; then pushd "$DIR" >/dev/null if $clean; then find . \ @@ -206,6 +210,7 @@ else python setup.py build_ext --inplace popd >/dev/null touch "$REF_FILE" + PY_REQUIREMENTS_CHANGED=true fi } diff --git a/misc/pylib/booleanOperations/requirements.txt b/misc/pylib/booleanOperations/requirements.txt index a9c6457ff..4f1d1b49a 100644 --- a/misc/pylib/booleanOperations/requirements.txt +++ b/misc/pylib/booleanOperations/requirements.txt @@ -1,3 +1,3 @@ -pyclipper==1.0.5 -fonttools==3.1.2 -ufoLib==2.0.0 +# pyclipper==1.0.5 +# fonttools==3.1.2 +# ufoLib==2.0.0 diff --git a/misc/pylib/fontbuild/Build.pyx b/misc/pylib/fontbuild/Build.pyx index ec6a7f59d..807ed6991 100644 --- a/misc/pylib/fontbuild/Build.pyx +++ b/misc/pylib/fontbuild/Build.pyx @@ -17,6 +17,7 @@ import ConfigParser import os import sys import math +import warnings from booleanOperations import BooleanOperationManager @@ -339,14 +340,19 @@ def removeGlyphOverlap(g): def saveOTF(font, destFile, glyphOrder, truetype=False): """Save a RoboFab font as an OTF binary using ufo2fdk.""" - - if truetype: - otf = compileTTF(font, featureCompilerClass=RobotoFeatureCompiler, - kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, - convertCubics=False, - useProductionNames=False) - else: - otf = compileOTF(font, featureCompilerClass=RobotoFeatureCompiler, - kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, - useProductionNames=False) - otf.save(destFile) + with warnings.catch_warnings(): + # Note: ignore warnings produced by compreffor, used by ufo2ft: + # 'Compreffor' class is deprecated; use 'compress' function instead + # which is triggered by ufo2ft which we can't update because newer + # versions completely break the API of ufo2ft. + warnings.simplefilter("ignore") + if truetype: + otf = compileTTF(font, featureCompilerClass=RobotoFeatureCompiler, + kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, + convertCubics=False, + useProductionNames=False) + else: + otf = compileOTF(font, featureCompilerClass=RobotoFeatureCompiler, + kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, + useProductionNames=False) + otf.save(destFile) diff --git a/misc/pylib/fontbuild/mix.pyx b/misc/pylib/fontbuild/mix.pyx index 7034a189d..9be434b6a 100644 --- a/misc/pylib/fontbuild/mix.pyx +++ b/misc/pylib/fontbuild/mix.pyx @@ -16,11 +16,17 @@ from numpy import array, append import copy import json -from robofab.objects.objectsRF import RPoint, RGlyph +from robofab.objects.objectsRF import RGlyph from robofab.world import OpenFont from decomposeGlyph import decomposeGlyph +class Vec2: + def __init__(self, x, y): + self.x = x + self.y = y + + class FFont: "Font wrapper for floating point operations" @@ -230,7 +236,7 @@ class Master: self.font = font self.ffont = FFont(font) if isinstance(v,float) or isinstance(v,int): - self.v = RPoint(v, v) + self.v = Vec2(v, v) else: self.v = v if kernlist != None: @@ -263,7 +269,7 @@ class Mix: def __init__(self,masters,v): self.masters = masters if isinstance(v,float) or isinstance(v,int): - self.v = RPoint(v,v) + self.v = Vec2(v,v) else: self.v = v diff --git a/requirements.txt b/requirements.txt index 4ad621e8e..c6932a792 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ -Cython==0.26.1 -compreffor==0.3.0 -cu2qu==1.2.0 -git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49 -fonttools==3.15.1 -freetype-py==1.0.2 -git+https://github.com/googlei18n/nototools@8db437b21de59b2d7aba30429c60a78f3e853caa -numpy==1.11.2rc1 -pyclipper==1.0.6 -scipy==0.18.1 +compreffor==0.4.6.post1 +cu2qu==1.5.0 +Cython==0.27.3 +defcon==0.5.2 +fonttools==3.29.0 +freetype-py==2.0.0.post6 +git+https://github.com/googlei18n/nototools@40aa4936022295cf851bb62f09a070f63fc8f5ae git+https://github.com/googlei18n/ufo2ft.git@6184b1493bc4afc6969bd2516d02f3f616cb5484 -ufoLib==2.0.0 -defcon==0.3.5 +git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49 +numpy==1.15.1 +pyclipper==1.0.6 # note: 1.1.0 is problematic +scipy==1.1.0 +ufoLib==2.3.1 |