summary refs log tree commit diff
path: root/gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch
diff options
context:
space:
mode:
authorAdriano Peluso <catonano@gmail.com>2017-04-05 15:29:56 +0200
committerArun Isaac <arunisaac@systemreboot.net>2017-05-27 18:41:12 +0530
commitb208f71b9b3540be9ae2b17b17b506a3526597b8 (patch)
treeca284e361d385ef3f93742fd3cac702a86227331 /gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch
parentad2ef260738982aa3493f1c54aa06aad8a827eea (diff)
downloadguix-b208f71b9b3540be9ae2b17b17b506a3526597b8.tar.gz
gnu: Add python-genshi.
 * gnu/packages/python.scm (python-genshi, python2-genshi): New variables.
 * gnu/packages/patches/python-genshi-add-support-for-python-3.4-AST.patch: New file.
 * gnu/packages/patches/python-genshi-buildable-on-python-2.7.patch: New file.
 * gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch: New file.
 * gnu/packages/patches/python-genshi-fix-tests-on-python-3.5.patch: New file.
 * gnu/packages/patches/python-genshi-isstring-helper.patch: New file.
 * gnu/packages/patches/python-genshi-stripping-of-unsafe-script-tags.patch: New file.
 * gnu/local.mk (dist_patch_DATA): Add them.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
Diffstat (limited to 'gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch')
-rw-r--r--gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch b/gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch
new file mode 100644
index 0000000000..c25c3bd7a9
--- /dev/null
+++ b/gnu/packages/patches/python-genshi-disable-speedups-on-python-3.3.patch
@@ -0,0 +1,32 @@
+From cef2c8df44166195e1705638f9f17033a4943bb7 Mon Sep 17 00:00:00 2001
+From: Simon Cross <hodgestar@gmail.com>
+Date: Sun, 16 Feb 2014 18:32:21 +0000
+Subject: [PATCH 02/15] Disable the speedups C extension on CPython >= 3.3
+ since Genshi doesn't support the new Unicode C API yet.
+
+---
+ setup.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 123a2cb..a3d748c 100755
+--- a/setup.py
++++ b/setup.py
+@@ -65,9 +65,13 @@ available.""")
+ 
+ 
+ if Feature:
++    # Optional C extension module for speeding up Genshi:
++    # Not activated by default on:
++    # - PyPy (where it harms performance)
++    # - CPython >= 3.3 (the new Unicode C API is not supported yet)
+     speedups = Feature(
+         "optional C speed-enhancements",
+-        standard = not is_pypy,
++        standard = not is_pypy and sys.version_info < (3, 3),
+         ext_modules = [
+             Extension('genshi._speedups', ['genshi/_speedups.c']),
+         ],
+-- 
+2.12.0
+