Blob Blame History Raw
%global pypi_name jsonpatch
%global github_name python-json-patch
%global commit 2572aa4d2f5f19b7943a6ea81828559afafc9eed
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           python-%{pypi_name}
Version:        1.1
Release:        2%{?dist}
Summary:        Applying JSON Patches in Python

License:        BSD
URL:            https://github.com/stefankoegl/%{github_name}
# pypi tarball does not contain COPYING
Source0:        https://github.com/stefankoegl/%{github_name}/archive/%{commit}/%{github_name}-%{version}-%{shortcommit}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-jsonpointer

%description
Library to apply JSON Patches according to RFC 6902.

%prep
%setup -qn %{github_name}-%{commit}

%build
%{__python} setup.py build

%install
%{__python} setup.py install --skip-build --root %{buildroot}

%check
%{__python} tests.py

%files
%doc README.md COPYING
%{python_sitelib}/%{pypi_name}.py*
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Fri Sep 13 2013 Alan Pevec <apevec@gmail.com> - 1.1-2
- review feedback: move %%check section, add missing build requirements

* Mon Jul 01 2013 Alan Pevec <apevec@gmail.com> - 1.1-1
- Initial package.