diff --git a/python-jsonpointer.changes b/python-jsonpointer.changes index d3d3361..59aee9c 100644 --- a/python-jsonpointer.changes +++ b/python-jsonpointer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 8 06:32:28 UTC 2017 - tbechtold@suse.com + +- convert to singlespec + ------------------------------------------------------------------- Tue Nov 15 10:51:34 UTC 2016 - dmueller@suse.com diff --git a/python-jsonpointer.spec b/python-jsonpointer.spec index 34b1c02..4531c59 100644 --- a/python-jsonpointer.spec +++ b/python-jsonpointer.spec @@ -1,7 +1,7 @@ # # spec file for package python-jsonpointer # -# 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,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-jsonpointer Version: 1.10 Release: 0 @@ -24,16 +25,15 @@ License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/stefankoegl/python-json-pointer Source: https://pypi.io/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros 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 Identify specific nodes in a JSON document (according to draft 08) @@ -42,30 +42,21 @@ Identify specific nodes in a JSON document (according to draft 08) %setup -q -n jsonpointer-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} - -# Prepare for update-alternatives usage -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{py_ver} -ln -s -f %{_sysconfdir}/alternatives/jsonpointer %{buildroot}%{_bindir}/jsonpointer +%python_install +%python_clone -a %{buildroot}%{_bindir}/jsonpointer %post -%_sbindir/update-alternatives \ - --install %{_bindir}/jsonpointer jsonpointer %{_bindir}/jsonpointer-%{py_ver} 20 +%python_install_alternative jsonpointer %preun -if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove jsonpointer %{_bindir}/jsonpointer-%{py_ver} -fi +%python_uninstall_alternative jsonpointer -%files +%files %{python_files} %defattr(-,root,root,-) -%{_bindir}/jsonpointer -%{_bindir}/jsonpointer-%{py_ver} -%ghost %{_sysconfdir}/alternatives/jsonpointer +%python_alternative %{_bindir}/jsonpointer %{python_sitelib}/* %changelog