summaryrefslogtreecommitdiff
path: root/misc/pylib/booleanOperations/setup.py
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2017-09-04 06:03:17 +0300
committerRasmus Andersson <rasmus@notion.se>2017-09-04 18:12:34 +0300
commit8234b62ab762637ef24c3398b4204a8ce8db31a7 (patch)
tree1c8df547021cdb58951630a015e4101ede46dbf1 /misc/pylib/booleanOperations/setup.py
parent31ae014e0c827dd76696fdab7e4ca3fed9f6402b (diff)
downloadinter-8234b62ab762637ef24c3398b4204a8ce8db31a7.tar.xz
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)
Diffstat (limited to 'misc/pylib/booleanOperations/setup.py')
-rw-r--r--misc/pylib/booleanOperations/setup.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/pylib/booleanOperations/setup.py b/misc/pylib/booleanOperations/setup.py
new file mode 100644
index 000000000..ce98414ce
--- /dev/null
+++ b/misc/pylib/booleanOperations/setup.py
@@ -0,0 +1,15 @@
+from distutils.core import setup
+from distutils.extension import Extension
+from Cython.Distutils import build_ext
+
+ext_modules = [
+ Extension("booleanGlyph", ["booleanGlyph.pyx"]),
+ Extension("booleanOperationManager", ["booleanOperationManager.pyx"]),
+ Extension("flatten", ["flatten.pyx"]),
+]
+
+setup(
+ name = 'booleanOperations',
+ cmdclass = {'build_ext': build_ext},
+ ext_modules = ext_modules
+)