#
# spec file for package python-simplejson
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-simplejson
Version:        3.8.2
Release:        1.1
Url:            http://github.com/simplejson/simplejson
Summary:        Simple, fast, extensible JSON encoder/decoder for Python
License:        MIT or AFL-2.1
Group:          Development/Languages/Python
Source:         http://pypi.python.org/packages/source/s/simplejson/simplejson-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-setuptools
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
%py_requires
%endif

%description
simplejson is a simple, fast, complete, correct and extensible
JSON encoder and decoder for Python 2.5+. It is pure Python code
with no dependencies, but includes an optional C extension for a
serious speed boost.

%prep
%setup -q -n simplejson-%{version}

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
python setup.py test

%files
%defattr(-,root,root)
%doc CHANGES.txt LICENSE.txt README.rst
%{python_sitearch}/simplejson/
%{python_sitearch}/simplejson-%{version}-py%{py_ver}.egg-info

%changelog
* Tue May 12 2015 benoit.monin@gmx.fr
- update to version 3.6.5:
  * Importing bug fix for reference leak when an error occurs
    during dict encoding
    https://github.com/simplejson/simplejson/issues/109
- additional changes from version 3.6.4:
  * Important bug fix for dump when only sort_keys is set
    https://github.com/simplejson/simplejson/issues/106
- additional changes from version 3.6.3:
  * Documentation updates
    https://github.com/simplejson/simplejson/issues/103
- additional changes from version 3.6.2:
  * Documentation updates
    http://bugs.python.org/issue21514
- additional changes from version 3.6.1:
  * Documentation updates
    https://github.com/simplejson/simplejson/issues/102
- additional changes from version 3.6.0:
  * Automatically strip any UTF-8 BOM from input to more closely
    follow the latest specs
    https://github.com/simplejson/simplejson/pull/101
- additional changes from version 3.5.3:
  * Fix lower bound checking in scan_once / raw_decode API
    https://github.com/simplejson/simplejson/issues/98
* Sat May 31 2014 dmueller@suse.com
- update to 3.5.2:
  * Fix Windows build with VS2008
  Version 3.5.1 released 2014-05-21
  * Consistently reject int_as_string_bitcount settings that are not
    positive integers
  Version 3.5.0 released 2014-05-20
  * Added int_as_string_bitcount encoder option
  * Fixed potential crash when encoder created with incorrect options
* Tue May 20 2014 toddrme2178@gmail.com
- Update to 3.4.1
  * Fixed tests to run on Python 3.4
- Update to 3.4.0
  * Native setuptools support re-introduced
    https://github.com/simplejson/simplejson/pull/92
- Update to 3.3.3
  * Improve test suite's Python 3.4 compatibility
    https://github.com/simplejson/simplejson/issues/87
- Update to 3.3.2
  * Docstring fix for decoded string types
    https://github.com/simplejson/simplejson/pull/82
* Thu Oct 24 2013 speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
* Mon Oct 21 2013 dmueller@suse.com
- update to 3.3.1:
  * JSONDecodeError exceptions can now be pickled
* Wed May  8 2013 benny.gaechter@gmail.com
- Update to version 3.3.0
  * Unpaired surrogates once again pass through the decoder, to match older
    behavior and the RFC-4627 spec.
    https://github.com/simplejson/simplejson/issues/62
* Thu Feb 21 2013 p.drouand@gmail.com
- Update to version 3.1.3
  * Updated documentation to discourage subclassing whenever possible.
    default, object_hook, and object_pairs_hook provide almost all of
    the functionality of subclassing.
- Update to version 3.1.2
  * Updated documentation to reflect separators behavior when indent is
    not None
  * Test suite should be compatible with debug builds of Python 2.x and 3.x
- Update to version 3.1.1
  * setup.py now has another workaround for Windows machines without
    MSVC installed
- Update to version 3.1.0
  * Updated JSON conformance test suite
  * simplejson.tool tests and bugfix for Python 3.x
  * Improve error messages for certain kinds of truncated input
  * Moved JSONDecodeError to json.scanner (still available for import
    from json.decoder)
  * Changed scanner to use JSONDecodeError directly rather than
    StopIteration to improve error messages
- Update to version 3.0.9
  * Fix an off-by-one error in the colno property of JSONDecodeError
    (when lineno == 1)
* Thu Feb 21 2013 p.drouand@gmail.com
- Update to version 3.0.8:
  * Fix a Python 2.x compiler warning for narrow unicode builds
    https://github.com/simplejson/simplejson/issues/56
* Thu Jan 17 2013 toddrme2178@gmail.com
- Update to 3.0.7
  * NOTE: this release only changes the license.
  * simplejson is now dual-licensed software, MIT or AFL v2.1. It is
    also made explicit that this code is also licensed to the PSF under
    a Contributor Agreement.
- Update to 3.0.7
  * Fix for major Python 2.x ensure_ascii=False encoding regression
    introduced in simplejson 3.0.0. If you use this setting, please
    upgrade immediately.
* Fri Jan 11 2013 p.drouand@gmail.com
- Initial python3 support
* Fri Jan 11 2013 p.drouand@gmail.com
- Update to 3.0.5:
  * NOTE: this release only changes the tests, it is
    not essential to upgrade
  * Tests now run with deprecation warnings printed
  * Fixed Python 3 syntax error in simplejson.tool
    https://github.com/simplejson/simplejson/issues/49
  * Fixed Python 3.3 deprecation warnings in test suite
    https://github.com/simplejson/simplejson/issues/48
- Update to 3.0.4 version:
  * MSVC compatibility for Python 3.3
    https://github.com/simplejson/simplejson/pull/47
- Update to 3.0.3 version:
  * Fixes for bugs introduced in 3.0.2
  * Fixes for Python 2.5 compatibility
  * MSVC compatibility for Python 2.x
    https://github.com/simplejson/simplejson/pull/46
- Update to 3.0.0 version:
  * Python 3.3 is now supported, thanks to Vinay Sajip
    https://github.com/simplejson/simplejson/issues/8
  * `sort_keys`/`item_sort_key` now sort on the stringified verison of the
    key, rather than the original object. This ensures that the sort
    only compares string types and makes the behavior consistent between
    Python 2.x and Python 3.x.
  * Like other number types, Decimal instances used as keys are now
    coerced to strings when use_decimal is True.
* Sat Sep 29 2012 os-dev@jacraig.com
- Update to 2.6.2:
  * JSONEncoderForHTML was not exported in the simplejson module
* Mon Sep  3 2012 os-dev@jacraig.com
- Update to 2.6.1:
  * raw_decode() now skips whitespace before the object
- Changes from 2.6.0:
  * Error messages changed to match proposal for Python 3.3.1
* Fri May 25 2012 toddrme2178@gmail.com
- Clean up spec file
- Update to version 2.5.2:
  * Fix for regression introduced in 2.5.1
- Update to version 2.5.1:
  * Support for use_decimal=True in environments that use Python
    sub-interpreters such as uWSGI
- Update to version 2.5.1:
  * New item_sort_key option for encoder to allow fine grained
    control of sorted output
* Mon Mar 12 2012 saschpe@gmx.de
- Update to version 2.4.0:
  * New bigint_as_string option for encoder to trade JavaScript number
    precision issues for type issues.
- Run testsuite
- Package README.rst, CHANGES.txt and LICENSE.txt
* Tue Sep 20 2011 saschpe@suse.de
- Re-add python-distribute, you can't simply remove that, it breaks RPM updates
* Tue Sep  6 2011 alexandre@exatati.com.br
- Update to 2.2.1:
  * Fix MANIFEST.in issue when building a sdist from a sdist.
    https://github.com/simplejson/simplejson/issues/16
- Aditional changes from version 2.2.0:
  * Remove setuptools requirement, reverted to pure distutils
  * use_decimal default for encoding (dump, dumps, JSONEncoder) is now True
  * tuple encoding as JSON objects can be turned off with new
    tuple_as_array=False option.
    https://github.com/simplejson/simplejson/pull/6
  * namedtuple (or other tuple subclasses with _asdict methods) are now
    encoded as JSON objects rather than arrays by default. Can be disabled
    and treated as a tuple with the new namedtuple_as_object=False option.
    https://github.com/simplejson/simplejson/pull/6
  * JSONDecodeError is now raised instead of ValueError when a document
    ends with an opening quote and the C speedups are in use.
    https://github.com/simplejson/simplejson/issues/15
  * Updated documentation with information about JSONDecodeError
  * Force unicode linebreak characters to be escaped (U+2028 and U+2029)
    http://timelessrepo.com/json-isnt-a-javascript-subset
  * Moved documentation from a git submodule to
    http://simplejson.readthedocs.org/
* Mon May  9 2011 alexandre@exatati.com.br
- Update to 2.1.6:
  * Prevent segfaults with deeply nested JSON documents
    https://github.com/simplejson/simplejson/issues/11
  * Fix compatibility with Python 2.5
    https://github.com/simplejson/simplejson/issues/5
  - Aditional changes from 2.1.5 released 2011-04-17:
  * Built sdist tarball with setuptools_git installed. Argh.
  - Aditional changes from 2.1.4 released 2011-04-17:
  * 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
- Regenerate spec file with py2pack.
* Thu Mar  3 2011 saschpe@suse.de
- Update to 2.1.3
  * Support the sort_keys option in C encoding speedups
  * Allow use_decimal to work with dump()
  * Correct wrong end when object_pairs_hook is used
  * Correct output for indent=0
  * Correctly raise TypeError when non-string keys are used with
    speedups
  * Fix the endlineno, endcolno attributes of the JSONDecodeError
    exception.
* Mon Jul  5 2010 alexandre@exatati.com.br
- Update to 2.1.1:
  * Corrected simplejson.__version__ and other minor doc changes.
  * Do not fail speedups tests if speedups could not be built.
  * Decimal serialization officially supported for encoding with
  use_decimal=True. For encoding this encodes Decimal objects and
  for decoding it implies parse_float=Decimal
  * Decoding performance and memory utilization enhancements
  ... see CHANGES.txt for more
- Spec file cleaned with spec-cleaner.
* Mon May 25 2009 James Oakley <jfunk@funktronics.ca>
- Update to 2.0.9
- Split off doc package
* Wed Dec  3 2008 James Oakley <jfunk@funktronics.ca>
- Update to 2.0.5
* Wed Mar 19 2008 James Oakley <jfunk@funktronics.ca>
- Update to 1.7.5
* Tue Oct 30 2007 James Oakley <jfunk@funktronics.ca>
- Update to 1.7.3
  Sun Sep 09 00:00:00 UTC 2007 - Peter Nixon
- first build