[packages/python-click] - cleanups, pl, added -apidocs; release 2

qboosh qboosh at pld-linux.org
Mon Mar 13 21:26:47 CET 2017


commit d18f22df5b63e5f84013e99d3bf9d2cf5fbccacd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Mar 13 21:28:59 2017 +0100

    - cleanups, pl, added -apidocs; release 2

 python-click.spec | 67 +++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 58 insertions(+), 9 deletions(-)
---
diff --git a/python-click.spec b/python-click.spec
index ef70519..c3f8f64 100644
--- a/python-click.spec
+++ b/python-click.spec
@@ -1,31 +1,40 @@
 #
 # Conditional build:
-%bcond_without	tests	# do not perform "make test"
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# py.test tests
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
 %define 	module	click
 Summary:	A simple wrapper around optparse for powerful command line utilities
+Summary(pl.UTF-8):	Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
 Name:		python-%{module}
 Version:	6.7
-Release:	1
+Release:	2
 License:	BSD
 Group:		Libraries/Python
 Source0:	https://github.com/pallets/click/archive/%{version}.tar.gz
 # Source0-md5:	3cae45d064f341b3f373489d8f7745e9
 URL:		http://click.pocoo.org/
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
+BuildRequires:	glibc-localedb-all
+%endif
 %if %{with python2}
-BuildRequires:	python-modules
+BuildRequires:	python-modules >= 2
 BuildRequires:	python-pytest
 BuildRequires:	python-setuptools
 %endif
 %if %{with python3}
-BuildRequires:	python3-modules
+BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-pytest
 BuildRequires:	python3-setuptools
 %endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg-2
+%endif
+Requires:	python-modules >= 2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -35,9 +44,18 @@ interfaces in a composable way with as little amount of code as
 necessary. It's the "Command Line Interface Creation Kit". It's highly
 configurable but comes with good defaults out of the box.
 
+%description -l pl.UTF-8
+click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
+w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
+Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
+(zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
+konfigurowalny, ale ma dobre ustawienia domyślne.
+
 %package -n python3-%{module}
 Summary:	A simple wrapper around optparse for powerful command line utilities
+Summary(pl.UTF-8):	Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
 Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.2
 
 %description -n python3-%{module}
 click is a Python 3 package for creating beautiful command line
@@ -45,6 +63,24 @@ interfaces in a composable way with as little amount of code as
 necessary. It's the "Command Line Interface Creation Kit". It's highly
 configurable but comes with good defaults out of the box.
 
+%description -n python3-%{module} -l pl.UTF-8
+click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
+w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
+Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
+(zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
+konfigurowalny, ale ma dobre ustawienia domyślne.
+
+%package apidocs
+Summary:	Documentation for Python click module
+Summary(pl.UTF-8):	Dokumentacja do modułu Pythona click
+Group:		Documentation
+
+%description apidocs
+Documentation for Python click module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja do modułu Pythona click.
+
 %prep
 %setup -q -n %{module}-%{version}
 
@@ -59,12 +95,19 @@ PYTHONPATH=$(pwd) py.test-%{py_ver} tests --tb=long --verbose
 %if %{with python3}
 %py3_build
 %if %{with tests}
-LANG=en_GB.utf8 LC_ALL=en_GB.utf8 PYTHONPATH=$(pwd) py.test-%{py3_ver} tests --tb=long --verbose
+LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) py.test-%{py3_ver} tests --tb=long --verbose
 %endif
 %endif
 
+%if %{with doc}
+# click-specific code is not python3 ready
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-2
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %if %{with python2}
 %py_install
 %py_postclean
@@ -80,7 +123,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README
+%doc CHANGES LICENSE README
 %{py_sitescriptdir}/%{module}
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
@@ -88,7 +131,13 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc README
+%doc CHANGES LICENSE README
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{module}-%{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-click.git/commitdiff/d18f22df5b63e5f84013e99d3bf9d2cf5fbccacd



More information about the pld-cvs-commit mailing list