From 74c38641b2dcf71bdf7be9eb780e15d69b98ed10 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Dec 18 2015 23:59:06 +0000 Subject: New upstream version - 3.2.1 - Add support for both python2 and python3. Signed-off-by: Paul Belanger --- diff --git a/.gitignore b/.gitignore index bafcd3b..cf28918 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /statsd-2.1.2.tar.gz +/statsd-3.2.1.tar.gz diff --git a/python-statsd.spec b/python-statsd.spec index 6a9e44d..31057bd 100644 --- a/python-statsd.spec +++ b/python-statsd.spec @@ -1,71 +1,101 @@ -%global owner jsocol -%global srcname pystatsd -%global pypi_name statsd +%if 0%{?fedora} +%global with_python3 1 +%endif -Name: python-%{pypi_name} -Version: 2.1.2 -Release: 3%{?dist} +%global srcname statsd + +Name: python-%{srcname} +Version: 3.2.1 +Release: 1%{?dist} Summary: A Python statsd client License: MIT -URL: https://github.com/%{owner}/%{srcname} -Source0: https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +URL: https://github.com/jsocol/pystatsd +Source0: https://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz + BuildArch: noarch BuildRequires: python2-devel -BuildRequires: python-pbr BuildRequires: python-mock BuildRequires: python-nose -BuildRequires: python-coverage +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif # if with_python3 %description -python-statsd implements a Python client for the statsd daemon. +A python client for the statsd daemon. -%package doc -Summary: Documentation of the Python client for the statsd daemon +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +A python client for the statsd daemon. -Provides: bundled(jquery) = 1.1.14 -Requires: %{name}%{?_isa} = %{version}-%{release} +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +A python client for the statsd daemon. + +%package doc +Summary: Documentation of the Python client for the statsd daemon BuildRequires: python-sphinx %description doc Documentation of the Python client for the statsd daemon. - %prep -%setup -q -n %{pypi_name}-%{version} +%autosetup -n %{srcname}-%{version} # Remove bundled egg-info -rm -rf %{pypi_name}.egg-info +rm -rf %{srcname}.egg-info # Let RPM handle the dependencies rm -f requirements.txt - %build -%{__python} setup.py build -# generate html docs -sphinx-build docs/ html -# remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} html/objects.inv +%py2_build +%if 0%{?with_python3} +%py3_build +%endif +## generate html docs +sphinx-build docs html +rm -rf html/.{doctrees,buildinfo} %install -%{__python} setup.py install --skip-build --root %{buildroot} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif %check -%{__python} setup.py test +%{__python2} setup.py test +%if 0%{?with_python3} +%{__python2} setup.py check +%endif +%files -n python2-%{srcname} +%license LICENSE +%doc AUTHORS README.rst +%{python2_sitelib}/* -%files -%doc README.rst +%if 0%{?with_python3} +%files -n python3-%{srcname} %license LICENSE -%{python_sitelib}/%{pypi_name} -%{python_sitelib}/%{pypi_name}-*egg-info +%doc AUTHORS README.rst +%{python3_sitelib}/* +%endif %files doc -%doc html %license LICENSE +%doc html %changelog +* Fri Dec 18 2015 Paul Belanger - 3.2.1-1 +- New upstream version - 3.2.1 +- Add support for both python2 and python3. + * Thu Jun 18 2015 Fedora Release Engineering - 2.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index a386c9d..f7f49a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b4cd485b9919ee62238c1949e8bffd6 statsd-2.1.2.tar.gz +d819e2375030f543522012046e6e36e9 statsd-3.2.1.tar.gz