4 %bcond_with doc # Sphinx documentation
5 %bcond_without tests # unit tests
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
10 Summary: Measure the number of terminal column cells of wide-character codes
11 Summary(pl.UTF-8): Pomiar liczby kolumn terminala koniecznych do wyświetlenia znaków
12 Name: python-%{module}
16 Group: Libraries/Python
17 #Source0Download: https://github.com/jquast/wcwidth/releases
18 Source0: https://github.com/jquast/wcwidth/archive/%{version}/%{module}-%{version}.tar.gz
19 # Source0-md5: c82382572afdbba64470f56374502952
20 URL: https://pypi.org/project/wcwidth/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-backports.functools_lru_cache >= 1.2.1
26 BuildRequires: python-pytest
27 BuildRequires: python-pytest-cov
31 BuildRequires: python3-modules >= 1:3.4
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-pytest
35 BuildRequires: python3-pytest-cov
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.714
41 BuildRequires: python3-sphinx-paramlinks
42 BuildRequires: python3-sphinx_rtd_theme
43 BuildRequires: python3-sphinxcontrib-manpage
44 BuildRequires: sphinx-pdg-3
46 Requires: python-modules >= 1:2.7
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 This library is mainly for those implementing a Terminal Emulator, or
52 programs that carefully produce output to be interpreted by one.
54 %description -l pl.UTF-8
55 Ta biblioteka przydaje się głównie implementującym emulator terminala
56 lub programom uważnie tworzących wyjście do interpretowania przez
59 %package -n python3-%{module}
60 Summary: Measure the number of terminal column cells of wide-character codes
61 Summary(pl.UTF-8): Pomiar liczby kolumn terminala koniecznych do wyświetlenia znaków
62 Group: Libraries/Python
63 Requires: python3-modules >= 1:3.4
65 %description -n python3-%{module}
66 This library is mainly for those implementing a Terminal Emulator, or
67 programs that carefully produce output to be interpreted by one.
69 %description -n python3-%{module} -l pl.UTF-8
70 Ta biblioteka przydaje się głównie implementującym emulator terminala
71 lub programom uważnie tworzących wyjście do interpretowania przez
75 %setup -q -n %{module}-%{version}
82 # test_package_version refers to distribution, fails without installed package
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 PYTEST_PLUGINS=pytest_cov.plugin \
86 %{__python} -m pytest tests -k 'not test_package_version'
94 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
95 PYTEST_PLUGINS=pytest_cov.plugin \
97 %{__python3} -m pytest tests -k 'not test_package_version'
102 sphinx-build-3 -b html docs docs/build/html
106 rm -rf $RPM_BUILD_ROOT
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc LICENSE README.rst
125 %{py_sitescriptdir}/wcwidth
126 %{py_sitescriptdir}/wcwidth-%{version}-py*.egg-info
130 %files -n python3-%{module}
131 %defattr(644,root,root,755)
132 %doc LICENSE README.rst
133 %{py3_sitescriptdir}/wcwidth
134 %{py3_sitescriptdir}/wcwidth-%{version}-py*.egg-info