d148cf8
%global owner     jsocol
d148cf8
%global srcname   pystatsd
d148cf8
%global pypi_name statsd
d148cf8
d148cf8
Name:       python-%{pypi_name}
d148cf8
Version:    2.1.2
d148cf8
Release:    2%{?dist}
d148cf8
Summary:    A Python statsd client
d148cf8
d148cf8
License:    MIT
d148cf8
URL:        https://github.com/%{owner}/%{srcname}
d148cf8
Source0:    https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
d148cf8
BuildArch:  noarch
d148cf8
d148cf8
BuildRequires:  python2-devel
d148cf8
BuildRequires:  python-pbr
d148cf8
BuildRequires:  python-mock
d148cf8
BuildRequires:  python-nose
d148cf8
BuildRequires:  python-coverage
d148cf8
d148cf8
%description
d148cf8
python-statsd implements a Python client for the statsd daemon.
d148cf8
d148cf8
%package doc
d148cf8
Summary:    Documentation of the Python client for the statsd daemon
d148cf8
d148cf8
Provides:       bundled(jquery) = 1.1.14
d148cf8
Requires:       %{name}%{?_isa} = %{version}-%{release}
d148cf8
BuildRequires:  python-sphinx
d148cf8
d148cf8
%description doc
d148cf8
Documentation of the Python client for the statsd daemon.
d148cf8
d148cf8
d148cf8
%prep
d148cf8
%setup -q -n %{pypi_name}-%{version}
d148cf8
# Remove bundled egg-info
d148cf8
rm -rf %{pypi_name}.egg-info
d148cf8
# Let RPM handle the dependencies
d148cf8
rm -f requirements.txt
d148cf8
d148cf8
d148cf8
%build
d148cf8
%{__python} setup.py build
d148cf8
# generate html docs
d148cf8
sphinx-build docs/ html
d148cf8
# remove the sphinx-build leftovers
d148cf8
rm -rf html/.{doctrees,buildinfo} html/objects.inv
d148cf8
d148cf8
d148cf8
%install
d148cf8
%{__python} setup.py install --skip-build --root %{buildroot}
d148cf8
d148cf8
%check
d148cf8
%{__python} setup.py test
d148cf8
d148cf8
d148cf8
%files
d148cf8
%doc README.rst
d148cf8
%license LICENSE
d148cf8
%{python_sitelib}/%{pypi_name}
d148cf8
%{python_sitelib}/%{pypi_name}-*egg-info
d148cf8
d148cf8
%files doc
d148cf8
%doc html
d148cf8
%license LICENSE
d148cf8
d148cf8
%changelog
d148cf8
* Tue Apr 28 2015 Tristan de Cacqueray <tdecacqu@redhat.com> - 2.1.2-2.fc21
d148cf8
- Fixed fedora-review warnings
d148cf8
d148cf8
* Thu Apr 23 2015 Tristan de Cacqueray <tdecacqu@redhat.com> - 2.1.2-1.fc21
d148cf8
- Initial packaging