[packages/python-blinker] - cleanup, enabled tests and docs; release 3
qboosh
qboosh at pld-linux.org
Thu Jan 21 17:17:48 CET 2021
commit 4b1919b353641d6e6b3676f372d34a206178e5ff
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jan 21 17:17:58 2021 +0100
- cleanup, enabled tests and docs; release 3
python-blinker.spec | 87 +++++++++++++++++++++++++++++------------------------
1 file changed, 48 insertions(+), 39 deletions(-)
---
diff --git a/python-blinker.spec b/python-blinker.spec
index ca691fd..a7837a5 100644
--- a/python-blinker.spec
+++ b/python-blinker.spec
@@ -1,37 +1,43 @@
#
# Conditional build:
-%bcond_with doc # don't build doc (not provided by package)
-%bcond_with tests # do not perform "make test" (not provided by package)
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module blinker
Summary: Fast, simple object-to-object and broadcast signaling
Summary(pl.UTF-8): Szybkie, proste przesyłanie sygnałów pomiędzy obiektami
-# Name must match the python module/package name (as in 'import' statement)
Name: python-%{module}
Version: 1.4
-Release: 2
+Release: 3
License: MIT
Group: Libraries/Python
-Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/blinker/
+Source0: https://files.pythonhosted.org/packages/source/b/blinker/%{module}-%{version}.tar.gz
# Source0-md5: 8b3722381f83c2813c52de3016b68d33
-URL: http://pythonhosted.org/blinker/
+URL: https://pythonhosted.org/blinker/
BuildRequires: rpm-pythonprov
-# if py_postclean is used
-BuildRequires: rpmbuild(macros) >= 1.710
-# when using /usr/bin/env or other in-place substitutions
-#BuildRequires: sed >= 4.0
+BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-distribute
+BuildRequires: python-modules >= 1:2.5
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-nose
+%endif
%endif
%if %{with python3}
-BuildRequires: python3-distribute
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-nose
+%endif
+%endif
+%if %{with doc}
+BuildRequires: python3-flask_sphinx_themes
+BuildRequires: sphinx-pdg-3
%endif
-# Below Rs only work for main package (python2)
-#Requires: python-libs
-Requires: python-modules
+Requires: python-modules >= 1:2.5
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -42,16 +48,16 @@ receivers can subscribe to specific senders or receive signals sent by
any sender.
%description -l pl.UTF-8
-Blinker dostarcza szybki system rozporowadzania sygnałów który
-pozawala na dowolną liczbe odbiorców zdarzeń czy szygnałów. Odbiorcy
-sygnałów mogą zapisywac się do wybranych nadawców czy odbierać sygnały
+Blinker dostarcza szybki system rozporowadzania sygnałów, który
+pozwala na dowolną liczbę odbiorców zdarzeń czy sygnałów. Odbiorcy
+sygnałów mogą zapisywać się do wybranych nadawców lub odbierać sygnały
nadadane przez wszystkich nadawców.
%package -n python3-%{module}
-Summary: -
-Summary(pl.UTF-8): -
+Summary: Fast, simple object-to-object and broadcast signaling
+Summary(pl.UTF-8): Szybkie, proste przesyłanie sygnałów pomiędzy obiektami
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.2
%description -n python3-%{module}
Blinker provides a fast dispatching system that allows any number of
@@ -60,38 +66,44 @@ receivers can subscribe to specific senders or receive signals sent by
any sender.
%description -n python3-%{module} -l pl.UTF-8
-Blinker dostarcza szybki system rozporowadzania sygnałów który
-pozawala na dowolną liczbe odbiorców zdarzeń czy szygnałów. Odbiorcy
-sygnałów mogą zapisywac się do wybranych nadawców czy odbierać sygnały
+Blinker dostarcza szybki system rozporowadzania sygnałów, który
+pozwala na dowolną liczbę odbiorców zdarzeń czy sygnałów. Odbiorcy
+sygnałów mogą zapisywać się do wybranych nadawców lub odbierać sygnały
nadadane przez wszystkich nadawców.
%package apidocs
-Summary: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
+Summary: Blinker API documentation
+Summary(pl.UTF-8): Dokumentacja API modułu Blinker
Group: Documentation
%description apidocs
-API documentation for %{module}.
+API documentation for Blinker.
%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+Dokumentacja API modułu Blinker.
%prep
%setup -q -n %{module}-%{version}
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+nosetests-%{py_ver} tests
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+nosetests-%{py3_ver} tests
+%endif
%endif
%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+sphinx-build-3 -b html docs/source docs/html
%endif
%install
@@ -114,12 +126,9 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS CHANGES README.md LICENSE
-%dir %{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}/*.py[co]
-%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
-%endif
%if %{with python3}
%files -n python3-%{module}
@@ -132,5 +141,5 @@ rm -rf $RPM_BUILD_ROOT
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc docs/html/{_static,*.html,*.js}
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-blinker.git/commitdiff/4b1919b353641d6e6b3676f372d34a206178e5ff
More information about the pld-cvs-commit
mailing list