# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: json_diff Version: 1.3.3 Release: 1%{?dist} Summary: Generates diff between two JSON files Group: Applications/Text License: MIT URL: https://gitorious.org/json_diff/ Source0: http://pypi.python.org/packages/source/j/json_diff/json_diff-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %if 0%{?rhel} > 0 && 0%{?rhel} <= 5 BuildRequires: python-simplejson %endif Requires: python >= 2.4 %description Compares two JSON files (http://json.org) and generates a new JSON file with the result. Allows exclusion of some keys from the comparison, or in other way to include only some keys. %prep %setup -q tr -d '\r' < README.txt > README %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} install -d %{buildroot}%{_bindir} chmod +x %{buildroot}%{python_sitelib}/json_diff.py ln -sf %{python_sitelib}/json_diff.py %{buildroot}%{_bindir}/json_diff %clean rm -rf %{buildroot} %check %{__python} setup.py test %files %defattr(-,root,root,-) %doc README %{_bindir}/json_diff %{python_sitelib}/* %changelog * Tue Apr 24 2012 MatÄj Cepl <mcepl@redhat.com> - 1.3.3-1 - python 2.4 compatibility * Tue Apr 24 2012 'Matej Cepl <mcepl@redhat.com>' - 1.3.1-2 - New upstream release (optional output file) * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Nov 30 2011 MatÄj Cepl <mcepl@redhat.com> 1.2.2-1 - New upstream release (exit code) - Make tests independent of the current locale (including on RHEL 5) - Workaround a stupid incompatible change in optparse between python 2.4 and 2.6 * Tue Nov 29 2011 MatÄj Cepl <mcepl@redhat.com> 1.1.0-1 - New upstream release (-a option added) * Wed Nov 23 2011 MatÄj Cepl <mcepl@redhat.com> 1.0.1-1 - New upstream version * Tue Nov 22 2011 MatÄj Cepl <mcepl@redhat.com> - 0.9.2-2 - Make the package buildable on EL-5 * Mon Nov 21 2011 MatÄj Cepl <mcepl@redhat.com> 0.9.2-1 - New upstream release (EL-5 compatible) * Mon Nov 21 2011 'MatÄj Cepl <mcepl@redhat.com>' - 0.9.1-1 - The first attempt to package