Skip to content
Snippets Groups Projects
Commit 2fad7dda50f6 authored by Bob Ippolito's avatar Bob Ippolito
Browse files

tweak build_ext to not fail

git-svn-id: http://simplejson.googlecode.com/svn/trunk@50 a4795897-2c25-0410-b006-0d3caba88fa1
parent 6ed6e9526ec9
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,6 @@
ez_setup.use_setuptools()
from setuptools import setup, find_packages, Extension, Feature
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError
......@@ -7,5 +9,5 @@
VERSION = '1.7'
VERSION = '1.7.1'
DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
LONG_DESCRIPTION = """
simplejson is a simple, fast, complete, correct and extensible
......@@ -32,6 +34,23 @@
Topic :: Software Development :: Libraries :: Python Modules
""".splitlines()))
BUILD_EXT_WARNING="""
WARNING: The C extension could not be compiled, speedups are not enabled.
Above is the output showing how the compilation failed.
"""
class ve_build_ext(build_ext):
# This class allows C extension building to fail.
def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
except CCompilerError, x:
print ('*'*70+'\n')
print BUILD_EXT_WARNING
print ('*'*70+'\n')
speedups = Feature(
"options C speed-enhancement modules",
standard=True,
......@@ -58,4 +77,5 @@
'paste.filter_app_factory': ['json = simplejson.jsonfilter:factory'],
},
features={'speedups': speedups},
cmdclass={'build_ext': ve_build_ext},
)
......@@ -86,7 +86,7 @@
Note that the JSON produced by this module's default settings
is a subset of YAML, so it may be used as a serializer for that as well.
"""
__version__ = '1.7'
__version__ = '1.7.1'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONEncoder',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment