Skip to content

Commit

Permalink
Don't build C extension when building for PyPy
Browse files Browse the repository at this point in the history
- Also bump version
  • Loading branch information
vtermanis committed Mar 20, 2020
1 parent 8effa82 commit e616db3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.16.0
- Don't use C extension under PyPy. (JIT-optimized pure-Python version is
considerably faster.)

0.15.0
- Fix decimal encoding bug/assert (reported by mgorny)

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import warnings
from glob import glob
from platform import python_implementation

# Allow for environments without setuptools
try:
Expand Down Expand Up @@ -63,7 +64,7 @@ def build_extension(self, ext):
% ext.name)


BUILD_EXTENSIONS = 'PYUBJSON_NO_EXTENSION' not in os.environ
BUILD_EXTENSIONS = 'PYUBJSON_NO_EXTENSION' not in os.environ and python_implementation() != 'PyPy'

COMPILE_ARGS = ['-std=c99']
# For testing/debug only - some of these are GCC-specific
Expand Down
2 changes: 1 addition & 1 deletion ubjson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
from .encoder import EncoderException
from .decoder import DecoderException

__version__ = '0.15.0'
__version__ = '0.16.0'

__all__ = ('EXTENSION_ENABLED', 'dump', 'dumpb', 'EncoderException', 'load', 'loadb', 'DecoderException')

0 comments on commit e616db3

Please sign in to comment.