| 1 | From cef2c8df44166195e1705638f9f17033a4943bb7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Simon Cross <hodgestar@gmail.com> |
| 3 | Date: Sun, 16 Feb 2014 18:32:21 +0000 |
| 4 | Subject: [PATCH 02/15] Disable the speedups C extension on CPython >= 3.3 |
| 5 | since Genshi doesn't support the new Unicode C API yet. |
| 6 | |
| 7 | --- |
| 8 | setup.py | 6 +++++- |
| 9 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/setup.py b/setup.py |
| 12 | index 123a2cb..a3d748c 100755 |
| 13 | --- a/setup.py |
| 14 | +++ b/setup.py |
| 15 | @@ -65,9 +65,13 @@ available.""") |
| 16 | |
| 17 | |
| 18 | if Feature: |
| 19 | + # Optional C extension module for speeding up Genshi: |
| 20 | + # Not activated by default on: |
| 21 | + # - PyPy (where it harms performance) |
| 22 | + # - CPython >= 3.3 (the new Unicode C API is not supported yet) |
| 23 | speedups = Feature( |
| 24 | "optional C speed-enhancements", |
| 25 | - standard = not is_pypy, |
| 26 | + standard = not is_pypy and sys.version_info < (3, 3), |
| 27 | ext_modules = [ |
| 28 | Extension('genshi._speedups', ['genshi/_speedups.c']), |
| 29 | ], |
| 30 | -- |
| 31 | 2.12.0 |
| 32 | |