- convert to singlespec
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpointer?expand=0&rev=19
This commit is contained in:
parent
37a26c3db5
commit
bc70a8def6
@ -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
|
Tue Nov 15 10:51:34 UTC 2016 - dmueller@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-jsonpointer
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-jsonpointer
|
Name: python-jsonpointer
|
||||||
Version: 1.10
|
Version: 1.10
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -24,16 +25,15 @@ License: BSD-3-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/stefankoegl/python-json-pointer
|
Url: https://github.com/stefankoegl/python-json-pointer
|
||||||
Source: https://pypi.io/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
Source: https://pypi.io/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
||||||
BuildRequires: python-devel
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Identify specific nodes in a JSON document (according to draft 08)
|
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}
|
%setup -q -n jsonpointer-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/jsonpointer
|
||||||
# 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
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%_sbindir/update-alternatives \
|
%python_install_alternative jsonpointer
|
||||||
--install %{_bindir}/jsonpointer jsonpointer %{_bindir}/jsonpointer-%{py_ver} 20
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%python_uninstall_alternative jsonpointer
|
||||||
%_sbindir/update-alternatives --remove jsonpointer %{_bindir}/jsonpointer-%{py_ver}
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/jsonpointer
|
%python_alternative %{_bindir}/jsonpointer
|
||||||
%{_bindir}/jsonpointer-%{py_ver}
|
|
||||||
%ghost %{_sysconfdir}/alternatives/jsonpointer
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user