Blob Blame History Raw
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

%global srcname jsonrpclib

Name:           python-%{srcname}
Version:        0.1.3
Release:        1%{?dist}
Summary:        JSON-RPC v2.0 client library for Python

License:        ASL 2.0
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://pypi.python.org/packages/source/j/%{srcname}/%{srcname}-%{version}.tar.gz

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

%description
This project is an implementation of the JSON-RPC v2.0 specification
(backwards-compatible) as a client library.


%prep
%setup -q -n %{srcname}-%{version}


%build
%{__python2} setup.py build


%install
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT

 
%files
%doc LICENSE.txt
%doc README.txt
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info


%changelog
* Fri Dec  4 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.1.3-2
- Added missing python-setuptools build dependency.
- Added python macros for el6.
- Other stylistic changes.

* Thu Aug  7 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.1.3-1
- Initial package for Fedora