diff --git a/jsonpatch-1.14.tar.gz b/jsonpatch-1.14.tar.gz deleted file mode 100644 index a74eaff..0000000 --- a/jsonpatch-1.14.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:776d828d6f7b4581862529cf413439a652d74b9e3a0261fa08c36fd761a78b4a -size 15234 diff --git a/jsonpatch-1.16.tar.gz b/jsonpatch-1.16.tar.gz new file mode 100644 index 0000000..b2e01fb --- /dev/null +++ b/jsonpatch-1.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f025c28a08ce747429ee746bb21796c3b6417ec82288f8fe6514db7398f2af8a +size 16213 diff --git a/python-jsonpatch.changes b/python-jsonpatch.changes index dc471d1..44c4f81 100644 --- a/python-jsonpatch.changes +++ b/python-jsonpatch.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 28 14:43:04 UTC 2017 - darin@darins.net + +- Convert packaging to Singlespec +- update to 1.16 + ------------------------------------------------------------------- Tue Nov 15 10:53:42 UTC 2016 - dmueller@suse.com diff --git a/python-jsonpatch.spec b/python-jsonpatch.spec index 128d89d..03dd7ce 100644 --- a/python-jsonpatch.spec +++ b/python-jsonpatch.spec @@ -1,7 +1,7 @@ # # spec file for package python-jsonpatch # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,64 +16,58 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test Name: python-jsonpatch -Version: 1.14 +Version: 1.16 Release: 0 Summary: Python - JSON-Patches License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/stefankoegl/python-json-patch Source: https://pypi.io/packages/source/j/jsonpatch/jsonpatch-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-jsonpointer -Requires: python-jsonpointer >= 1.9 +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module jsonpointer >= 1.9} +%endif +Requires: %{python_module jsonpointer >= 1.9} Requires(post): update-alternatives Requires(preun): 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()")} -%else BuildArch: noarch -%endif + +%python_subpackages %description Python module to apply JSON-Patches (according to RFC 6902). %prep %setup -q -n jsonpatch-%{version} -sed -i "s|entry_poimts|entry_points|" setup.py # Typo fix already in upstream git.. %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install # Prepare for update-alternatives usage -mkdir -p %{buildroot}%{_sysconfdir}/alternatives for p in jsonpatch jsondiff ; do - mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver} - ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p + %python_clone -a %{buildroot}%{_bindir}/$p done %post -%_sbindir/update-alternatives \ - --install %{_bindir}/jsonpatch jsonpatch %{_bindir}/jsonpatch-%{py_ver} 20 \ - --slave %{_bindir}/jsondiff jsondiff %{_bindir}/jsondiff-%{py_ver} +%python_install_alternative jsonpatch jsondiff %preun -if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove jsonpatch %{_bindir}/jsonpatch-%{py_ver} -fi +%python_uninstall_alternative jsonpatch jsondiff -%files +%files %{python_files} %defattr(-,root,root,-) -%{_bindir}/jsondiff -%{_bindir}/jsonpatch -%{_bindir}/jsondiff-%{py_ver} -%{_bindir}/jsonpatch-%{py_ver} -%ghost %{_sysconfdir}/alternatives/jsondiff -%ghost %{_sysconfdir}/alternatives/jsonpatch -%{python_sitelib}/jsonpatch* +%doc AUTHORS COPYING README.md +%python_alternative %{_bindir}/jsonpatch +%python_alternative %{_bindir}/jsondiff +%{python_sitelib}/* %changelog