Skip to content
Myr

fixed a couple of errors with the c extensions build process on windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 92d414a · Browse files · 2 files+12 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−2 removed

  • other:+12 added−2 removed

2 files+12 added−2 removed

modified:jinja/_speedups.c+2 added-1 removed
435 unmodified lines
436 0, /* tp_descr_set */437 0, /* tp_dictoffset */438 (initproc)BaseContext_init, /* tp_init */439 0, /* tp_alloc */440 PyType_GenericNew /* tp_new */440 0 /* tp_new */441};442443static PyMethodDef module_methods[] = {444 {NULL, NULL, 0, NULL} /* Sentinel */
6 unmodified lines
451init_speedups(void)452{453 PyObject *module;454455 BaseContextType.tp_new = (newfunc)PyType_GenericNew;456 if (PyType_Ready(&BaseContextType) < 0)457 return;458459 if (!init_constants())
9 unmodified lines
modified:setup.py+10 added-1 removed
4 unmodified lines
5import ez_setup6ez_setup.use_setuptools()78from distutils.command.build_ext import build_ext9from distutils.errors import CCompilerError9from distutils.errors import CCompilerError, DistutilsError10from setuptools import setup, Extension, Feature11from inspect import getdoc1213
7 unmodified lines
212223class optional_build_ext(build_ext):2425 def run(self):26 try:27 build_ext.run(self)28 except DistutilsError, e:29 self.compiler = None30 self._setup_error = e3132 def build_extension(self, ext):33 try:34 if self.compiler is None:35 raise self._setup_error36 build_ext.build_extension(self, ext)37 except CCompilerError, e:38 print '=' * 7939 print 'INFORMATION'
68 unmodified lines