A new user interface for you!

File python-cjson.spec of Package python-cjson

%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-cjson
Version:        1.0.5
Release:        2%{?dist}
Summary:        Fast JSON encoder/decoder for Python

Group:          Development/Languages
License:        LGPLv2+
URL:            http://pypi.python.org/pypi/python-cjson
Source0:        http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
Patch0:         python-cjson-1.0.5-CVE-2010-1666.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
BuildRequires:	-post-build-checks

JSON stands for JavaScript Object Notation and is a text based lightweight
data exchange format which is easy for humans to read/write and for machines
to parse/generate. JSON is completely language independent and has multiple
implementations in most of the programming languages, making it ideal for
data exchange and storage.

The module is written in C and it is up to 250 times faster when compared to
the other python JSON implementations which are written directly in python.
This speed gain varies with the complexity of the data and the operation and
is the the range of 10-200 times for encoding operations and in the range of
100-250 times for decoding operations.

%setup -q
%patch0 -p1

CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT


# For arch-specific packages: sitearch

* Sat Jul 03 2010 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.0.5-2
- CVE-2010-1666 (fixed by including a patch from Ubuntu, see Launchpad 585274)

* Thu Mar 20 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.5-1
- Initial Fedora build.