upgrade dependencies

This commit is contained in:
Rasmus Andersson 2018-08-28 09:43:39 -07:00
parent 5ecf53902e
commit 18ba0aee6a
5 changed files with 48 additions and 31 deletions

View file

@ -80,7 +80,9 @@ else
} }
# TODO: allow setting a flag to recreate venv # 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 if [[ ! -d "$VENV_DIR/bin" ]]; then
echo "Setting up virtualenv in '$VENV_DIR'" echo "Setting up virtualenv in '$VENV_DIR'"
@ -96,11 +98,13 @@ else
UPDATE_TIMESTAMP_FILE="$VENV_DIR/last-pip-run.mark" UPDATE_TIMESTAMP_FILE="$VENV_DIR/last-pip-run.mark"
REQUIREMENTS_FILE=$SRCDIR/requirements.txt REQUIREMENTS_FILE=$SRCDIR/requirements.txt
PY_REQUIREMENTS_CHANGED=false
if [ "$REQUIREMENTS_FILE" -nt "$UPDATE_TIMESTAMP_FILE" ]; then if [ "$REQUIREMENTS_FILE" -nt "$UPDATE_TIMESTAMP_FILE" ]; then
echo "pip install -r $REQUIREMENTS_FILE" echo "pip install -r $REQUIREMENTS_FILE"
pip install -r "$REQUIREMENTS_FILE" pip install -r "$REQUIREMENTS_FILE"
date '+%s' > "$UPDATE_TIMESTAMP_FILE" date '+%s' > "$UPDATE_TIMESTAMP_FILE"
PY_REQUIREMENTS_CHANGED=true
fi fi
# ———————————————————————————————————————————————————————————————————————————————————————————————— # ————————————————————————————————————————————————————————————————————————————————————————————————
@ -189,7 +193,7 @@ else
DIR=$1 DIR=$1
REF_FILE=$DIR/$2 REF_FILE=$DIR/$2
set -e 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 pushd "$DIR" >/dev/null
if $clean; then if $clean; then
find . \ find . \
@ -206,6 +210,7 @@ else
python setup.py build_ext --inplace python setup.py build_ext --inplace
popd >/dev/null popd >/dev/null
touch "$REF_FILE" touch "$REF_FILE"
PY_REQUIREMENTS_CHANGED=true
fi fi
} }

View file

@ -1,3 +1,3 @@
pyclipper==1.0.5 # pyclipper==1.0.5
fonttools==3.1.2 # fonttools==3.1.2
ufoLib==2.0.0 # ufoLib==2.0.0

View file

@ -17,6 +17,7 @@ import ConfigParser
import os import os
import sys import sys
import math import math
import warnings
from booleanOperations import BooleanOperationManager from booleanOperations import BooleanOperationManager
@ -339,14 +340,19 @@ def removeGlyphOverlap(g):
def saveOTF(font, destFile, glyphOrder, truetype=False): def saveOTF(font, destFile, glyphOrder, truetype=False):
"""Save a RoboFab font as an OTF binary using ufo2fdk.""" """Save a RoboFab font as an OTF binary using ufo2fdk."""
with warnings.catch_warnings():
if truetype: # Note: ignore warnings produced by compreffor, used by ufo2ft:
otf = compileTTF(font, featureCompilerClass=RobotoFeatureCompiler, # 'Compreffor' class is deprecated; use 'compress' function instead
kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, # which is triggered by ufo2ft which we can't update because newer
convertCubics=False, # versions completely break the API of ufo2ft.
useProductionNames=False) warnings.simplefilter("ignore")
else: if truetype:
otf = compileOTF(font, featureCompilerClass=RobotoFeatureCompiler, otf = compileTTF(font, featureCompilerClass=RobotoFeatureCompiler,
kernWriter=RobotoKernWriter, glyphOrder=glyphOrder, kernWriter=RobotoKernWriter, glyphOrder=glyphOrder,
useProductionNames=False) convertCubics=False,
otf.save(destFile) useProductionNames=False)
else:
otf = compileOTF(font, featureCompilerClass=RobotoFeatureCompiler,
kernWriter=RobotoKernWriter, glyphOrder=glyphOrder,
useProductionNames=False)
otf.save(destFile)

View file

@ -16,11 +16,17 @@
from numpy import array, append from numpy import array, append
import copy import copy
import json import json
from robofab.objects.objectsRF import RPoint, RGlyph from robofab.objects.objectsRF import RGlyph
from robofab.world import OpenFont from robofab.world import OpenFont
from decomposeGlyph import decomposeGlyph from decomposeGlyph import decomposeGlyph
class Vec2:
def __init__(self, x, y):
self.x = x
self.y = y
class FFont: class FFont:
"Font wrapper for floating point operations" "Font wrapper for floating point operations"
@ -230,7 +236,7 @@ class Master:
self.font = font self.font = font
self.ffont = FFont(font) self.ffont = FFont(font)
if isinstance(v,float) or isinstance(v,int): if isinstance(v,float) or isinstance(v,int):
self.v = RPoint(v, v) self.v = Vec2(v, v)
else: else:
self.v = v self.v = v
if kernlist != None: if kernlist != None:
@ -263,7 +269,7 @@ class Mix:
def __init__(self,masters,v): def __init__(self,masters,v):
self.masters = masters self.masters = masters
if isinstance(v,float) or isinstance(v,int): if isinstance(v,float) or isinstance(v,int):
self.v = RPoint(v,v) self.v = Vec2(v,v)
else: else:
self.v = v self.v = v

View file

@ -1,13 +1,13 @@
Cython==0.26.1 compreffor==0.4.6.post1
compreffor==0.3.0 cu2qu==1.5.0
cu2qu==1.2.0 Cython==0.27.3
git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49 defcon==0.5.2
fonttools==3.15.1 fonttools==3.29.0
freetype-py==1.0.2 freetype-py==2.0.0.post6
git+https://github.com/googlei18n/nototools@8db437b21de59b2d7aba30429c60a78f3e853caa git+https://github.com/googlei18n/nototools@40aa4936022295cf851bb62f09a070f63fc8f5ae
numpy==1.11.2rc1
pyclipper==1.0.6
scipy==0.18.1
git+https://github.com/googlei18n/ufo2ft.git@6184b1493bc4afc6969bd2516d02f3f616cb5484 git+https://github.com/googlei18n/ufo2ft.git@6184b1493bc4afc6969bd2516d02f3f616cb5484
ufoLib==2.0.0 git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49
defcon==0.3.5 numpy==1.15.1
pyclipper==1.0.6 # note: 1.1.0 is problematic
scipy==1.1.0
ufoLib==2.3.1