# HG changeset patch
# User Bob Ippolito <bob@redivi.com>
# Date 1302633215 25200
#      Tue Apr 12 11:33:35 2011 -0700
# Node ID 50d38c5ed887bb78e876cc14ee84f36c1a8bbf01
# Parent  6e8dc56c01018389a23a49977f58a370df1f06a5
do not try to build extension under PyPy

diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 *.egg-info
+*.egg
 *.pyc
 *.so
 /build
diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 Version 2.1.4 released XXXX-XX-XX
 
+* Does not try to build the extension when using PyPy
 * Trailing whitespace after commas no longer emitted when indent is used
 * Migrated to github http://github.com/simplejson/simplejson
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,6 +12,7 @@
 from distutils.errors import CCompilerError, DistutilsExecError, \
     DistutilsPlatformError
 
+IS_PYPY = hasattr(sys, 'pypy_translation_info')
 VERSION = '2.1.4'
 DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
 LONG_DESCRIPTION = open('README.rst', 'r').read()
@@ -84,7 +85,7 @@
     )
 
 try:
-    run_setup(True)
+    run_setup(not IS_PYPY)
 except BuildFailed:
     BUILD_EXT_WARNING = "WARNING: The C extension could not be compiled, speedups are not enabled."
     print '*' * 75