]> git.pld-linux.org Git - packages/docutils.git/commitdiff
- added unit tests
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 18 Jul 2018 17:00:10 +0000 (19:00 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 18 Jul 2018 17:00:10 +0000 (19:00 +0200)
docutils.spec

index 0e47481cada9af9d9e727740fcbd02631ee33d6a..c7a5264d6f7a50e72ad8e5de4364df9e74c0cedb 100644 (file)
@@ -2,6 +2,7 @@
 # Conditional build:
 %bcond_without python2 # CPython 2.x version
 %bcond_without python3 # CPython 3.x version
+%bcond_without tests   # unit tests
 
 Summary:       Documentation Utilities
 Summary(pl.UTF-8):     Narzędzia do tworzenia dokumentacji
@@ -14,12 +15,12 @@ Source0:    http://downloads.sourceforge.net/docutils/%{name}-%{version}.tar.gz
 # Source0-md5: c53768d63db3873b7d452833553469de
 URL:           http://docutils.sourceforge.net/
 %if %{with python2}
-BuildRequires: python-devel >= 2.3
+BuildRequires: python-devel >= 1:2.4
 %endif
 %if %{with python3}
-BuildRequires: python3-2to3 >= 1:3.6
+BuildRequires: python3-2to3 >= 1:3.7
 BuildRequires: python3-2to3 < 1:3.8
-BuildRequires: python3-devel >= 3.7
+BuildRequires: python3-devel >= 1:3.7
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
@@ -106,10 +107,20 @@ Ten pakiet dostarcza moduły Docutils dla Pythona 3.
 %build
 %if %{with python2}
 %{__python} setup.py config build -b build-2
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/build-2/lib \
+%{__python} test/alltests.py
+%endif
 %endif
 
 %if %{with python3}
 %{__python3} setup.py config build -b build-3
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/build-3/lib \
+%{__python3} test3/alltests.py
+%endif
 %endif
 
 %install
This page took 0.107751 seconds and 4 git commands to generate.