[packages/python-cmd2] - updated to 0.8.9

qboosh qboosh at pld-linux.org
Sun Jan 14 17:56:14 CET 2024


commit 86f0092eda5389f586aaa850c3a3576511c58982
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jan 14 17:26:41 2024 +0100

    - updated to 0.8.9

 python-cmd2.spec | 92 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 51 insertions(+), 41 deletions(-)
---
diff --git a/python-cmd2.spec b/python-cmd2.spec
index 2553348..aa0a2d9 100644
--- a/python-cmd2.spec
+++ b/python-cmd2.spec
@@ -1,48 +1,52 @@
 #
 # Conditional build:
-%bcond_with	doc	# build doc (broken)
-%bcond_with	tests	# do perform "make test" (broken)
+%bcond_with	tests	# unit tests (some failing)
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
 Summary:	cmd2 - a tool for building interactive command line applications in Python
+Summary(pl.UTF-8):	cmd2 - narzędzie do tworzenia interaktywnych aplikacji linii poleceń w Pythonie
 Name:		python-cmd2
-Version:	0.7.5
-Release:	8
+# keep 0.8.x here for python2 support
+Version:	0.8.9
+Release:	1
 License:	MIT
 Group:		Libraries/Python
-Source0:	https://pypi.python.org/packages/99/18/0bfe8240ffaebd28b1bce5a48170404e32bc1de6e640c8e7f37f1e522edb/cmd2-%{version}.tar.gz
-# Source0-md5:	9f758f3a6a20f1220d60f6320bb839b3
-URL:		https://pypi.python.org/pypi/cmd2
+Source0:	https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-%{version}.tar.gz
+# Source0-md5:	878976772c305486dfbca3aff4b4e779
+URL:		https://pypi.org/project/cmd2/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools
 %if %{with tests}
+BuildRequires:	python-contextlib2
+BuildRequires:	python-enum34
 BuildRequires:	python-mock
 BuildRequires:	python-pyparsing >= 2.0.1
 BuildRequires:	python-pyperclip
 BuildRequires:	python-pytest
 BuildRequires:	python-six
+BuildRequires:	python-subprocess32
+BuildRequires:	python-wcwidth
 %endif
 %endif
 %if %{with python3}
+BuildRequires:	python3-modules >= 1:3.4
 BuildRequires:	python3-setuptools
 %if %{with tests}
-BuildRequires:	python3-mock
+%if "%{py3_ver}" == "3.4"
+BuildRequires:	python3-contextlib2
+%endif
 BuildRequires:	python3-pyparsing >= 2.0.1
 BuildRequires:	python3-pyperclip
 BuildRequires:	python3-pytest
 BuildRequires:	python3-six
-%endif
-%if %{with doc}
-BuildRequires:	python3-sphinx_rtd_theme
-BuildRequires:	sphinx-pdg-3
+BuildRequires:	python3-wcwidth
 %endif
 %endif
-Requires:	python3-pyparsing >= 2.0.1
-Requires:	python3-pyperclip
-Requires:	python3-six
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -55,10 +59,19 @@ cmd module. cmd2 provides a wealth of features on top of cmd to make
 your life easier and eliminates much of the boilerplate code which
 would be necessary when using cmd.
 
+%description -l pl.UTF-8
+cmd2 to narzędzie do tworzenia interaktywnych aplikacji linii poleceń
+w Pythonie. Jego celem jest ułatwienie szybkiego tworzenia bogatych
+funkcjonalnie, przyjaznych dla użytkownika aplikacji linii poleceń.
+Zapewnia proste API, rozszerzające wbudowany w Pythona moduł cmd; daje
+bogate możliwości, ułatwiające życie i eliminujące dużą część
+powtarzalnego kodu, który trzeba by było napisać, używając cmd.
+
 %package -n python3-cmd2
 Summary:	cmd2 - a tool for building interactive command line applications in Python
+Summary(pl.UTF-8):	cmd2 - narzędzie do tworzenia interaktywnych aplikacji linii poleceń w Pythonie
 Group:		Libraries/Python
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.4
 
 %description -n python3-cmd2
 cmd2 is a tool for building interactive command line applications in
@@ -69,30 +82,33 @@ cmd module. cmd2 provides a wealth of features on top of cmd to make
 your life easier and eliminates much of the boilerplate code which
 would be necessary when using cmd.
 
-%package apidocs
-Summary:	API documentation for Python cmd2 module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona cmd2
-Group:		Documentation
-
-%description apidocs
-API documentation for Pythona cmd2 module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona cmd2.
+%description -n python3-cmd2 -l pl.UTF-8
+cmd2 to narzędzie do tworzenia interaktywnych aplikacji linii poleceń
+w Pythonie. Jego celem jest ułatwienie szybkiego tworzenia bogatych
+funkcjonalnie, przyjaznych dla użytkownika aplikacji linii poleceń.
+Zapewnia proste API, rozszerzające wbudowany w Pythona moduł cmd; daje
+bogate możliwości, ułatwiające życie i eliminujące dużą część
+powtarzalnego kodu, który trzeba by było napisać, używając cmd.
 
 %prep
 %setup -q -n cmd2-%{version}
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:pytest}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:pytest}
+%py3_build
 
-%if %{with doc}
-%{__python3} setup.py build_sphinx
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
 %endif
 %endif
 
@@ -109,13 +125,13 @@ rm -rf $RPM_BUILD_ROOT
 %py3_install
 %endif
 
-# in case there are examples provided
 %if %{with python2}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-cmd2-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-cmd2-%{version}
 find $RPM_BUILD_ROOT%{_examplesdir}/python-cmd2-%{version} -name '*.py' \
 	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
 %endif
+
 %if %{with python3}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-cmd2-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-cmd2-%{version}
@@ -129,8 +145,8 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.md README.md
-%{py_sitescriptdir}/cmd2.py*
+%doc CHANGELOG.md LICENSE README.md
+%{py_sitescriptdir}/cmd2.py[co]
 %{py_sitescriptdir}/cmd2-%{version}-py*.egg-info
 %{_examplesdir}/python-cmd2-%{version}
 %endif
@@ -138,15 +154,9 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-cmd2
 %defattr(644,root,root,755)
-%doc CHANGES.md README.md
+%doc CHANGELOG.md LICENSE README.md
 %{py3_sitescriptdir}/cmd2.py
-%{py3_sitescriptdir}/__pycache__/*
+%{py3_sitescriptdir}/__pycache__/cmd2.cpython-*.py[co]
 %{py3_sitescriptdir}/cmd2-%{version}-py*.egg-info
 %{_examplesdir}/python3-cmd2-%{version}
 %endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
-%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-cmd2.git/commitdiff/86f0092eda5389f586aaa850c3a3576511c58982



More information about the pld-cvs-commit mailing list