forked from pool/python-jsonpatch
Accepting request 205476 from home:dirkmueller:branches:devel:languages:python
- update to 1.3: * Improved Tests, add command line utilities - add update-alternatives OBS-URL: https://build.opensuse.org/request/show/205476 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpatch?expand=0&rev=7
This commit is contained in:
committed by
Git OBS Bridge
parent
18eddeacf2
commit
49e2a92fd2
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0a5e453fa7ec05e838fc66301708115e59fc9866a1bb46ed08da33c7d0ba2e14
|
|
||||||
size 5461
|
|
||||||
3
jsonpatch-1.3.tar.gz
Normal file
3
jsonpatch-1.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a937c97325aa81ed6e326bd7c34f87f932b6c08ab89549e83c3d9098637d0390
|
||||||
|
size 9940
|
||||||
@@ -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
|
Thu Jul 11 14:41:17 UTC 2013 - dmueller@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-jsonpatch
|
Name: python-jsonpatch
|
||||||
Version: 1.1
|
Version: 1.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Apply JSON-Patches (according to draft 08)
|
Summary: Python - JSON-Patches
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/stefankoegl/python-json-patch
|
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-devel
|
||||||
BuildRequires: python-jsonpointer
|
BuildRequires: python-jsonpointer
|
||||||
Requires: python-jsonpointer >= 1.0
|
Requires: python-jsonpointer >= 1.0
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%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()")}
|
%{!?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
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Apply JSON-Patches (according to draft 08)
|
Python module to apply JSON-Patches (according to RFC 6902).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n jsonpatch-%{version}
|
%setup -q -n jsonpatch-%{version}
|
||||||
@@ -45,9 +47,30 @@ python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
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
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
%ghost %{_bindir}/jsonpatch
|
||||||
|
%{_bindir}/jsonpatch-%{py_ver}
|
||||||
|
%ghost %{_bindir}/jsondiff
|
||||||
|
%{_bindir}/jsondiff-%{py_ver}
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user