2013-02-22 14:01:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-jsonpointer
|
|
|
|
#
|
2016-11-15 10:52:26 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-02-22 14:01:49 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2013-04-29 13:39:48 +00:00
|
|
|
#
|
2013-02-22 14:01:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-jsonpointer
|
2016-11-15 10:52:26 +00:00
|
|
|
Version: 1.10
|
2013-02-22 14:01:49 +00:00
|
|
|
Release: 0
|
2016-08-15 15:52:22 +00:00
|
|
|
Summary: Identify specific nodes in a JSON document
|
2013-04-29 13:39:48 +00:00
|
|
|
License: BSD-3-Clause
|
2013-02-22 14:01:49 +00:00
|
|
|
Group: Development/Languages/Python
|
2013-04-29 13:39:48 +00:00
|
|
|
Url: https://github.com/stefankoegl/python-json-pointer
|
2016-11-15 10:52:26 +00:00
|
|
|
Source: https://pypi.io/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
2013-02-22 14:01:49 +00:00
|
|
|
BuildRequires: python-devel
|
2015-02-04 18:01:59 +00:00
|
|
|
BuildRequires: python-setuptools
|
2016-08-15 15:52:22 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2013-02-22 14:01:49 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
%description
|
|
|
|
Identify specific nodes in a JSON document (according to draft 08)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n jsonpointer-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2014-09-15 14:01:37 +00:00
|
|
|
|
2016-08-15 15:52:22 +00:00
|
|
|
# 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
|
2014-09-15 14:01:37 +00:00
|
|
|
|
|
|
|
%post
|
2016-08-15 15:52:22 +00:00
|
|
|
%_sbindir/update-alternatives \
|
|
|
|
--install %{_bindir}/jsonpointer jsonpointer %{_bindir}/jsonpointer-%{py_ver} 20
|
2014-09-15 14:01:37 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
2016-08-15 15:52:22 +00:00
|
|
|
%_sbindir/update-alternatives --remove jsonpointer %{_bindir}/jsonpointer-%{py_ver}
|
2014-09-15 14:01:37 +00:00
|
|
|
fi
|
2013-02-22 14:01:49 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2016-08-15 15:52:22 +00:00
|
|
|
%{_bindir}/jsonpointer
|
2014-09-15 14:01:37 +00:00
|
|
|
%{_bindir}/jsonpointer-%{py_ver}
|
2016-08-15 15:52:22 +00:00
|
|
|
%ghost %{_sysconfdir}/alternatives/jsonpointer
|
2013-02-22 14:01:49 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|