%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-simplejson Version: 2.0.9 Release: 8%{?dist} Summary: Simple, fast, extensible JSON encoder/decoder for Python Group: System Environment/Libraries License: MIT URL: http://undefined.org/python/#simplejson Source0: http://pypi.python.org/packages/source/s/simplejson/simplejson-%{version}.tar.gz Patch0: %{name}-fix-containerless-unicode-float-decoding-r177.patch # not upstreamed, but just modifies the test suite to verify that the issue # above is really fixed. Patch1: %{name}-add-test-for-containerless-unicode-float-decoding.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: diffstat %description simplejson is a simple, fast, complete, correct and extensible JSON <http://json.org> encoder and decoder for Python 2.4+. It has no external dependencies. simplejson was formerly known as simple_json, but changed its name to comply with PEP 8 module naming guidelines. The encoder may be subclassed to provide serialization in any kind of situation, without any special support by the objects to be serialized (somewhat like pickle). The decoder can handle incoming JSON strings of any specified encoding (UTF-8 by default). %prep %setup -q -n simplejson-%{version} # Update timestamps on the files touched by a patch, to avoid non-equal # .pyc/.pyo files across the multilib peers within a build UpdateTimestamps() { Level=$1 PatchFile=$2 for f in $(diffstat $Level -l $PatchFile); do touch -r $PatchFile $f done } %patch0 -p1 UpdateTimestamps -p1 %{PATCH0} %patch1 -p1 UpdateTimestamps -p1 %{PATCH1} %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT \ --single-version-externally-managed %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc docs LICENSE.txt %dir %{python_sitearch}/simplejson %{python_sitearch}/simplejson-%{version}-py%{pyver}.egg-info %{python_sitearch}/simplejson/*.py* %dir %{python_sitearch}/simplejson/tests %{python_sitearch}/simplejson/tests/*.py* %{python_sitearch}/simplejson/_speedups.so %changelog * Mon Apr 4 2011 David Malcolm <dmalcolm@redhat.com> - 2.0.9-8 - multilib fixes Related: rhbz#675233 * Fri Mar 25 2011 David Malcolm <dmalcolm@redhat.com> - 2.0.9-7 - own the simplejson/tests directory Related: rhbz#675233 * Mon Mar 21 2011 David Malcolm <dmalcolm@redhat.com> - 2.0.9-6 - python-setuptools, not python-setuptools-devel Related: rhbz#675233 * Mon Mar 21 2011 David Malcolm <dmalcolm@redhat.com> - 2.0.9-5 - drop the %%check: python-nose isn't in EL5 Related: rhbz#675233 * Mon Mar 21 2011 David Malcolm <dmalcolm@redhat.com> - 2.0.9-4 - rebase to latest version from EPEL5, bumping release Related: rhbz#675233 * Wed Aug 11 2010 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 2.0.9-2 - add patch to fix containerless unicode float decoding (bz 622835) * Thu Jun 4 2009 Kyle VanderBeek <kylev@kylev.com> - 2.0.9-1 - Update to 2.0.9 - Make sure to require gcc to the speedups get compiled - Fix description since we're not "pure" python - Change to pypi instead of cheesehop * Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> 2.0.7-1 - Update to 2.0.7 * Thu Oct 23 2008 Luke Macken <lmacken@redhat.com> 2.0.3-2 - Use nose to run the simplejson test suite * Mon Oct 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.3-1 - update to 2.0.3 * Wed Oct 01 2008 Luke Macken <lmacken@redhat.com> - 2.0.1-1 - Update to 2.0.1, which contains many optimizations and bugfixes * Wed Sep 24 2008 Luke Macken <lmacken@redhat.com> - 1.9.3-1 - Update to 1.9.3, which includes a significant decoding speed boost, and various bug fixes. * Tue May 06 2008 Luke Macken <lmacken@redhat.com> - 1.9.1-1 - Update to 1.9.1 * Wed Apr 02 2008 Luke Macken <lmacken@redhat.com> - 1.8.1-1 - Update to 1.8.1 * Thu Feb 28 2008 Luke Macken <lmacken@redhat.com> - 1.7.4-1 - Update to 1.7.4 * Fri Feb 8 2008 Luke Macken <lmacken@redhat.com> - 1.7.3-3 - Rebuild for gcc 4.3 * Wed Oct 24 2007 Luke Macken <lmacken@redhat.com> - 1.7.3-2 - Include the LICENSE.txt * Wed Oct 3 2007 Luke Macken <lmacken@redhat.com> - 1.7.3-1 - 1.7.3 * Sun Sep 2 2007 Luke Macken <lmacken@redhat.com> - 1.7.1-3 - Update for python-setuptools changes in rawhide * Tue Aug 21 2007 Luke Macken <lmacken@redhat.com> - 1.7.1-2 - Rebuild * Sun Jul 8 2007 Luke Macken <lmacken@redhat.com> - 1.7.1-1 - 1.7.1 * Wed Mar 21 2007 Luke Macken <lmacken@redhat.com> - 1.7-2 - Use python_sitearch instead of sitelib * Tue Mar 20 2007 Luke Macken <lmacken@redhat.com> - 1.7-1 - 1.7 (Bug #233212) * Sat Mar 3 2007 Luke Macken <lmacken@redhat.com> - 1.5 - 1.5 * Sat Dec 9 2006 Luke Macken <lmacken@redhat.com> - 1.4-4 - Add python-devel to BuildRequires * Sat Dec 9 2006 Luke Macken <lmacken@redhat.com> - 1.4-2 - Rebuild for new python * Fri Nov 24 2006 Luke Macken <lmacken@redhat.com> - 1.4-1 - 1.4 * Sun Sep 3 2006 Luke Macken <lmacken@redhat.com> - 1.3-4 - Rebuild for FC6 * Mon Aug 14 2006 Luke Macken <lmacken@redhat.com> - 1.3-3 - Include .pyo's instead of just ghosting them * Wed Jul 12 2006 Luke Macken <lmacken@redhat.com> - 1.3-2 - Add --single-version-externally-managed flag to install * Mon Jul 10 2006 Luke Macken <lmacken@redhat.com> - 1.3-1 - Initial package