diff --git a/jsonpatch-1.1.tar.gz b/jsonpatch-1.1.tar.gz deleted file mode 100644 index 1aee317..0000000 --- a/jsonpatch-1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a5e453fa7ec05e838fc66301708115e59fc9866a1bb46ed08da33c7d0ba2e14 -size 5461 diff --git a/jsonpatch-1.3.tar.gz b/jsonpatch-1.3.tar.gz new file mode 100644 index 0000000..cd5ef7b --- /dev/null +++ b/jsonpatch-1.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a937c97325aa81ed6e326bd7c34f87f932b6c08ab89549e83c3d9098637d0390 +size 9940 diff --git a/python-jsonpatch.changes b/python-jsonpatch.changes index 5989a37..6a06977 100644 --- a/python-jsonpatch.changes +++ b/python-jsonpatch.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 21 13:18:40 UTC 2013 - dmueller@suse.com + +- update to 1.3: + * Improved Tests, add command line utilities +- add update-alternatives + ------------------------------------------------------------------- Thu Jul 11 14:41:17 UTC 2013 - dmueller@suse.com diff --git a/python-jsonpatch.spec b/python-jsonpatch.spec index c560c1e..6fcd4ed 100644 --- a/python-jsonpatch.spec +++ b/python-jsonpatch.spec @@ -17,9 +17,9 @@ Name: python-jsonpatch -Version: 1.1 +Version: 1.3 Release: 0 -Summary: Apply JSON-Patches (according to draft 08) +Summary: Python - JSON-Patches License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/stefankoegl/python-json-patch @@ -27,6 +27,8 @@ Source: http://pypi.python.org/packages/source/j/jsonpatch/jsonpatch-%{v BuildRequires: python-devel BuildRequires: python-jsonpointer Requires: python-jsonpointer >= 1.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -35,7 +37,7 @@ BuildArch: noarch %endif %description -Apply JSON-Patches (according to draft 08) +Python module to apply JSON-Patches (according to RFC 6902). %prep %setup -q -n jsonpatch-%{version} @@ -45,9 +47,30 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +for i in patch diff; do + mv %{buildroot}%{_bindir}/json$i %{buildroot}%{_bindir}/json$i-%{py_ver} +done + +%pre +[[ ! -L %{_bindir}/jsonpatch ]] && rm -f %{_bindir}/jsonpatch || : +[[ ! -L %{_bindir}/jsondiff ]] && rm -f %{_bindir}/jsondiff || : + +%post +update-alternatives --install \ + %{_bindir}/jsonpatch jsonpatch %{_bindir}/jsonpatch-%{py_ver} 20 \ + --slave %{_bindir}/jsondiff jsondiff %{_bindir}/jsondiff-%{py_ver} + +%preun +if [ $1 -eq 0 ] ; then + update-alternatives --remove jsonpatch %{_bindir}/jsonpatch-%{py_ver} +fi %files %defattr(-,root,root,-) +%ghost %{_bindir}/jsonpatch +%{_bindir}/jsonpatch-%{py_ver} +%ghost %{_bindir}/jsondiff +%{_bindir}/jsondiff-%{py_ver} %{python_sitelib}/* %changelog