commit c5542f5e056d162806b5c23eeff7a6cc3c19c516
Author: Jakub Bogusz <[email protected]>
Date:   Fri Mar 11 22:03:03 2022 +0100

    - updated to 0.2.5

 python-wcwidth.spec | 43 +++++++++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 12 deletions(-)
---
diff --git a/python-wcwidth.spec b/python-wcwidth.spec
index 3ba94a4..6036d25 100644
--- a/python-wcwidth.spec
+++ b/python-wcwidth.spec
@@ -1,5 +1,7 @@
+# TODO: finish doc
 #
 # Conditional build:
+%bcond_with    doc     # Sphinx documentation
 %bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
@@ -8,19 +10,21 @@
 Summary:       Measure the number of terminal column cells of wide-character 
codes
 Summary(pl.UTF-8):     Pomiar liczby kolumn terminala koniecznych do 
wyświetlenia znaków
 Name:          python-%{module}
-Version:       0.1.8
-Release:       2
+Version:       0.2.5
+Release:       1
 License:       MIT
 Group:         Libraries/Python
 #Source0Download: https://github.com/jquast/wcwidth/releases
 Source0:       
https://github.com/jquast/wcwidth/archive/%{version}/%{module}-%{version}.tar.gz
-# Source0-md5: 66162542f776260ae611085ca92a97f1
+# Source0-md5: c82382572afdbba64470f56374502952
 URL:           https://pypi.org/project/wcwidth/
 %if %{with python2}
 BuildRequires: python-modules >= 1:2.7
 BuildRequires: python-setuptools
 %if %{with tests}
+BuildRequires: python-backports.functools_lru_cache >= 1.2.1
 BuildRequires: python-pytest
+BuildRequires: python-pytest-cov
 %endif
 %endif
 %if %{with python3}
@@ -28,10 +32,17 @@ BuildRequires:      python3-modules >= 1:3.4
 BuildRequires: python3-setuptools
 %if %{with tests}
 BuildRequires: python3-pytest
+BuildRequires: python3-pytest-cov
 %endif
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-sphinx-paramlinks
+BuildRequires: python3-sphinx_rtd_theme
+BuildRequires: python3-sphinxcontrib-manpage
+BuildRequires: sphinx-pdg-3
+%endif
 Requires:      python-modules >= 1:2.7
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -68,7 +79,11 @@ takowy.
 %py_build
 
 %if %{with tests}
-%{__python} -m pytest wcwidth/tests
+# test_package_version refers to distribution, fails without installed package
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin \
+PYTHONPATH=$(pwd) \
+%{__python} -m pytest tests -k 'not test_package_version'
 %endif
 %endif
 
@@ -76,8 +91,15 @@ takowy.
 %py3_build
 
 %if %{with tests}
-%{__python3} -m pytest wcwidth/tests
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin \
+PYTHONPATH=$(pwd) \
+%{__python3} -m pytest tests -k 'not test_package_version'
+%endif
 %endif
+
+%if %{with doc}
+sphinx-build-3 -b html docs docs/build/html
 %endif
 
 %install
@@ -87,13 +109,10 @@ rm -rf $RPM_BUILD_ROOT
 %py_install
 
 %py_postclean
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/wcwidth/tests
 %endif
 
 %if %{with python3}
 %py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/wcwidth/tests
 %endif
 
 %clean
@@ -102,15 +121,15 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc LICENSE.txt README.rst
+%doc LICENSE README.rst
 %{py_sitescriptdir}/wcwidth
-%{py_sitescriptdir}/wcwidth-0.1.7-py*.egg-info
+%{py_sitescriptdir}/wcwidth-%{version}-py*.egg-info
 %endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc LICENSE.txt README.rst
+%doc LICENSE README.rst
 %{py3_sitescriptdir}/wcwidth
-%{py3_sitescriptdir}/wcwidth-0.1.7-py*.egg-info
+%{py3_sitescriptdir}/wcwidth-%{version}-py*.egg-info
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-wcwidth.git/commitdiff/c5542f5e056d162806b5c23eeff7a6cc3c19c516

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to