14
0

Accepting request 249253 from Cloud:OpenStack:Master

New upstream release

OBS-URL: https://build.opensuse.org/request/show/249253
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonschema?expand=0&rev=17
This commit is contained in:
Jan Matejek
2014-09-15 14:01:21 +00:00
committed by Git OBS Bridge
parent 9393e4d33a
commit 796ff442a2
4 changed files with 37 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
Name: python-jsonschema
Version: 2.2.0
Version: 2.4.0
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
@@ -25,8 +25,11 @@ Group: Development/Languages/Python
Url: http://github.com/Julian/jsonschema
Source: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
# Test build requirements
BuildRequires: python-mock
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-unittest2
@@ -47,15 +50,31 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-%{py_ver}
ln -s %{_bindir}/jsonschema-%{py_ver} %{buildroot}%{_bindir}/jsonschema
%if 0%{?suse_version} > 1110
%check
python -m unittest jsonschema.tests.test_jsonschema_test_suite
%endif
%pre
[[ ! -L %{_bindir}/jsonschema ]] && rm -f %{_bindir}/jsonschema || :
%post
update-alternatives --install \
%{_bindir}/jsonschema jsonschema %{_bindir}/jsonschema-%{py_ver} 20
%preun
if [ $1 -eq 0 ] ; then
update-alternatives --remove jsonschema %{_bindir}/jsonschema-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc COPYING README.rst
%ghost %{_bindir}/jsonschema
%{_bindir}/jsonschema-%{py_ver}
%{python_sitelib}/*
%changelog