[packages/python3-colorama] Run test suite
arekm
arekm at pld-linux.org
Wed Aug 26 17:21:51 CEST 2026
commit 3445fe0801fb264881500b51cc6a927b0379beb3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 26 17:21:40 2026 +0200
Run test suite
python3-colorama.spec | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/python3-colorama.spec b/python3-colorama.spec
index 86004e5..e26e97d 100644
--- a/python3-colorama.spec
+++ b/python3-colorama.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
%define module colorama
Summary: Cross-platform colored terminal text
Summary(pl.UTF-8): Wieloplatformowe kolorowanie tekstu na terminalu
@@ -68,6 +72,10 @@ działać także pod Windows dzięki prostemu wywołaniu colorama.init().
%build
%py3_build_pyproject
+%if %{with tests}
+%{__python3} -m unittest discover -p '*_test.py'
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -76,7 +84,7 @@ rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
cp -a demos/*.{py,sh} $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
-%{__sed} -i -e 's,^python ,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/demo.sh
+%{__sed} -i -e 's,^python ,%{__python3} ,' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/demo.sh
%clean
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-colorama.git/commitdiff/3445fe0801fb264881500b51cc6a927b0379beb3
More information about the pld-cvs-commit
mailing list