Trash debugsupport.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Cory Benfield · committed by Cory Benfield · parent 460251c · Browse files · 4 files·+7 added−122 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+7 added−122 removed
- other:+7 added−122 removed
Provenance
- Commit
447d3d2- Tree
30dc430- Author
Cory Benfield <lukasaoz@gmail.com>- Committer
Cory Benfield <lukasaoz@gmail.com>- Parent
460251c
4 files changed+7 added−122 removed
modified:docs/intro.rst-24 removed
12 unmodified lines13 -------------14 15 Jinja2 works with Python 2.6.x, 2.7.x and >= 3.3.16 17-FIXME - this is outdated, code should get removed, docs fixed:18-Additionally a working C-compiler that can create python extensions should be19-installed for the debugger if you are using Python 2.4.20-21-If you don't have a working C-compiler and you are trying to install the source22-release with the debugsupport you will get a compiler error.23-24-.. _ctypes: http://python.net/crew/theller/ctypes/25-26-17 Installation18 ------------19 20 You have multiple ways to install Jinja2. If you are unsure what to do, go62 unmodified lines83 84 .. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe85 86 97-Enable the debug support Module98-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~99-100-By default Jinja2 will not compile the debug support module. Enabling this101-will fail if you don't have the Python headers or a working compiler. This102-is often the case if you are installing Jinja2 from a windows machine.103-104-FIXME - outdated:105-Because the debug support is only necessary for Python 2.4 you will not106-have to do this unless you run 2.4::107-108- sudo python setup.py --with-debugsupport install109-110-87 Basic API Usage88 ---------------89 90 This section gives you a brief introduction to the Python API for Jinja237 unmodified linesdeleted:jinja2/_debugsupport.c-78 removed
1-/**2- * jinja2._debugsupport3- * ~~~~~~~~~~~~~~~~~~~~4- *5- * C implementation of `tb_set_next`.6- *7- * :copyright: (c) 2010 by the Jinja Team.8- * :license: BSD.9- */10-11-#include <Python.h>12-13-14-static PyObject*15-tb_set_next(PyObject *self, PyObject *args)16-{17- PyTracebackObject *tb, *old;18- PyObject *next;19-20- if (!PyArg_ParseTuple(args, "O!O:tb_set_next", &PyTraceBack_Type, &tb, &next))21- return NULL;22- if (next == Py_None)23- next = NULL;24- else if (!PyTraceBack_Check(next)) {25- PyErr_SetString(PyExc_TypeError,26- "tb_set_next arg 2 must be traceback or None");27- return NULL;28- }29- else30- Py_INCREF(next);31-32- old = tb->tb_next;33- tb->tb_next = (PyTracebackObject*)next;34- Py_XDECREF(old);35-36- Py_INCREF(Py_None);37- return Py_None;38-}39-40-static PyMethodDef module_methods[] = {41- {"tb_set_next", (PyCFunction)tb_set_next, METH_VARARGS,42- "Set the tb_next member of a traceback object."},43- {NULL, NULL, 0, NULL} /* Sentinel */44-};45-46-47-#if PY_MAJOR_VERSION < 348-49-#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */50-#define PyMODINIT_FUNC void51-#endif52-PyMODINIT_FUNC53-init_debugsupport(void)54-{55- Py_InitModule3("jinja2._debugsupport", module_methods, "");56-}57-58-#else /* Python 3.x module initialization */59-60-static struct PyModuleDef module_definition = {61- PyModuleDef_HEAD_INIT,62- "jinja2._debugsupport",63- NULL,64- -1,65- module_methods,66- NULL,67- NULL,68- NULL,69- NULL70-};71-72-PyMODINIT_FUNC73-PyInit__debugsupport(void)74-{75- return PyModule_Create(&module_definition);76-}77-78-#endifmodified:jinja2/debug.py+3 added-6 removed
329 unmodified lines330 # proxies.331 tb_set_next = None332 if tproxy is None:333 try:334- from jinja2._debugsupport import tb_set_next335- except ImportError:336- try:337- tb_set_next = _init_ugly_crap()338- except:339- pass334+ tb_set_next = _init_ugly_crap()335+ except:336+ pass337 del _init_ugly_crapmodified:setup.py+4 added-14 removed
35 unmodified lines36 .. _documentation: http://jinja.pocoo.org/2/documentation/37 """38 import sys39 40-from setuptools import setup, Extension, Feature40+from setuptools import setup41 42-debugsupport = Feature(43- 'optional C debug support',44- standard=False,45- ext_modules = [46- Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),47- ],48-)42 50-43 # ignore the old '--with-speedups' flag44 try:45 speedups_pos = sys.argv.index('--with-speedups')46 except ValueError:47 pass48 else:57- sys.argv[speedups_pos] = '--with-debugsupport'49+ sys.argv[speedups_pos] = ''50 sys.stderr.write('*' * 74 + '\n')51 sys.stderr.write('WARNING:\n')60- sys.stderr.write(' the --with-speedups flag is deprecated, assuming '61- '--with-debugsupport\n')52+ sys.stderr.write(' the --with-speedups flag is deprecated\n')53 sys.stderr.write(' For the actual speedups install the MarkupSafe '54 'package.\n')55 sys.stderr.write('*' * 74 + '\n')56 30 unmodified lines87 include_package_data=True,88 entry_points="""89 [babel.extractors]90 jinja2 = jinja2.ext:babel_extract[i18n]100- """,101- features={'debugsupport': debugsupport}91+ """92 )