File python-demjson.spec of Package python-demjson
#
# spec file for package python-demjson
#
# Copyright (c) 2016 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
# 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/
#
Name: python-demjson
Version: 2.2.4
Release: 0
Url: http://deron.meranda.us/python/demjson/
Summary: Encoder, decoder, and lint/validator for JSON compliant with RFC 4627
License: LGPL-3.0+
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/d/demjson/demjson-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
This module provides classes and functions for encoding or decoding data
represented in the language-neutral JSON format (which is often used as a
simpler substitute for XML in Ajax web applications). This implementation tries
to be as compliant to the JSON specification (RFC 4627) as possible, while
still providing many optional extensions to allow less restrictive JavaScript
syntax. It includes complete Unicode support, including UTF-32, BOM, and
surrogate pair processing. It can also support JavaScript's
NaN and Infinity numeric types as well as it's 'undefined' type.
It also includes a lint-like JSON syntax validator which tests JSON text
for strict compliance to the standard.
%prep
%setup -q -n demjson-%{version}
sed -i "1d" demjson.py # Fix non-executable script
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt docs
%{_bindir}/jsonlint
%{python_sitelib}/*
%changelog