Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 473c60b97ebc5e067cfc2c25b67ce7c1 > files > 2

python-demjson-1.6-2.mga3.src.rpm

Name:           python-demjson
Version:        1.6
Release:        %mkrel 2
Summary:        Python JSON module and lint checker

Group:          Development/Python
License:        LGPLv3+
URL:            http://deron.meranda.us/python/demjson/
Source0:        http://deron.meranda.us/python/demjson/dist/demjson-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Provides:	jsonlint


%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}

%build
%if 0%{?rhel} && 0%{?rhel} < 6
%{__python} -c 'import setuptools; execfile("setup.py")' build
%else
%{__python} setup.py build
%endif

%install
rm -rf %{buildroot}
%if 0%{?rhel} && 0%{?rhel} < 6
%{__python} -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot}
%else
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%endif
%{__install} -m 0755 -D -p jsonlint %{buildroot}%{_bindir}/jsonlint

# fix shebang lines
%{__sed} -i "1c#! /usr/bin/python" %{buildroot}%{_bindir}/jsonlint
find %{buildroot}%{python_sitelib} -name '*.py' -exec \
     %{__sed} -i "1{/^#!/d}" {} \;

%files
%doc docs/demjson.html docs/jsonlint.txt
%doc AUTHORS.txt CHANGES.txt LICENSE.txt
%doc NEWS.txt README.txt THANKS.txt
%{python_sitelib}/*
%{_bindir}/jsonlint




%changelog

* Sun Jan 13 2013 umeabot <umeabot> 1.6-2.mga3
+ Revision: 378659
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Sep 09 2012 matteo <matteo> 1.6-1.mga3
+ Revision: 291103
- fixed buildrequirement python-setuptools
- spec file reviewed
- Import Fedora package