1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-27 09:49:07 +03:00
inter/misc/pylib/robofab/setup.py
Rasmus Andersson 8234b62ab7 Speeds up font compilation by around 200%
Cython is used to compile some hot paths into native Python extensions.
These hot paths were identified through running ufocompile with the hotshot
profiler and then converting file by file to Cython, starting with the "hottest"
paths and continuing until returns were deminishing. This means that only a few
Python files were converted to Cython.

Closes #23
Closes #20 (really this time)
2017-09-04 11:12:34 -04:00

20 lines
610 B
Python
Executable File

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [
Extension("objects.objectsBase", ["objects/objectsBase.pyx"]),
Extension("objects.objectsRF", ["objects/objectsRF.pyx"]),
Extension("pens.rfUFOPen", ["pens/rfUFOPen.pyx"]),
Extension("pens.boundsPen", ["pens/boundsPen.pyx"]),
Extension("xmlTreeBuilder", ["xmlTreeBuilder.pyx"]),
Extension("misc.arrayTools", ["misc/arrayTools.pyx"]),
Extension("glifLib", ["glifLib.pyx"]),
]
setup(
name = 'robofab',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)