[packages/python-statsd] - initial, used by openstacksdk tests
qboosh
qboosh at pld-linux.org
Tue Apr 21 17:54:01 CEST 2026
commit cd3af5f1be7a526a8e9bdb28c82dcfb76852fa97
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Apr 21 17:54:24 2026 +0200
- initial, used by openstacksdk tests
python-statsd.spec | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 143 insertions(+)
---
diff --git a/python-statsd.spec b/python-statsd.spec
new file mode 100644
index 0000000..c3cf5a5
--- /dev/null
+++ b/python-statsd.spec
@@ -0,0 +1,143 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_with python3 # CPython 3.x module (built from python3-statsd.spec)
+
+Summary: A simple statsd client
+Summary(pl.UTF-8): Prosty klient statsd
+Name: python-statsd
+# keep 3.x here for python2 support
+Version: 3.3.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/statsd/
+Source0: https://files.pythonhosted.org/packages/source/s/statsd/statsd-%{version}.tar.gz
+# Source0-md5: b397ccf880f37cf099e775907ebf7a46
+URL: https://pypi.org/project/statsd/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-mock
+BuildRequires: python-nose
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-mock
+BuildRequires: python3-pynose
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: sphinx-pdg-2
+%endif
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+statsd is a friendly front-end to Graphite. This is a Python client
+for the statsd daemon.
+
+%description -l pl.UTF-8
+statsd to przyjazny frontend do Graphite. Ten pakiet to pythonowy
+klient demona statsd.
+
+%package -n python3-statsd
+Summary: A simple statsd client
+Summary(pl.UTF-8): Prosty klient statsd
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
+
+%description -n python3-statsd
+statsd is a friendly front-end to Graphite. This is a Python client
+for the statsd daemon.
+
+%description -n python3-statsd -l pl.UTF-8
+statsd to przyjazny frontend do Graphite. Ten pakiet to pythonowy
+klient demona statsd.
+
+%package apidocs
+Summary: API documentation for Python statsd module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona statsd
+Group: Documentation
+
+%description apidocs
+API documentation for Python statsd module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona statsd.
+
+%prep
+%setup -q -n statsd-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+nosetests-%{py_ver} statsd/tests.py
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+nosetests-%{py3_ver} statsd/tests.py
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-2
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+
+%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/statsd/tests.py*
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/statsd/{tests.py,__pycache__/tests.*.py*}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGES LICENSE README.rst
+%{py_sitescriptdir}/statsd
+%{py_sitescriptdir}/statsd-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-statsd
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGES LICENSE README.rst
+%{py3_sitescriptdir}/statsd
+%{py3_sitescriptdir}/statsd-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-statsd.git/commitdiff/cd3af5f1be7a526a8e9bdb28c82dcfb76852fa97
More information about the pld-cvs-commit
mailing list