[packages/python-wcwidth] - updated to 0.1.7, cleaned up the mess
qboosh
qboosh at pld-linux.org
Sun Sep 22 07:50:22 CEST 2019
commit c0e42432115051fd002a9ed4453ce227b8c45583
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 22 07:53:25 2019 +0200
- updated to 0.1.7, cleaned up the mess
python-wcwidth.spec | 109 +++++++++++++++++++++++++---------------------------
1 file changed, 52 insertions(+), 57 deletions(-)
---
diff --git a/python-wcwidth.spec b/python-wcwidth.spec
index a6f1fae..8887e2e 100644
--- a/python-wcwidth.spec
+++ b/python-wcwidth.spec
@@ -1,81 +1,83 @@
+#
# Conditional build:
-%bcond_with doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module wcwidth
-Summary: Measures number of Terminal column cells of wide-character codes
-Summary(pl.UTF-8): Mierzy liczbe kolumn terminala konieczna do wyświetlenia znaków
+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.6
-Release: 2
+Version: 0.1.7
+Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://github.com/jquast/wcwidth/archive/%{version}.tar.gz
-# Source0-md5: fc5fd0275d76b6a7a7ab2cc8829c919a
-URL: https://pypi.python.org/pypi/wcwidth
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
+#Source0Download: https://github.com/jquast/wcwidth/releases
+Source0: https://github.com/jquast/wcwidth/archive/%{version}/%{module}-%{version}.tar.gz
+# Source0-md5: 77e4c7d31435a57792b4e42961e8aad6
+URL: https://pypi.org/project/wcwidth/
%if %{with python2}
-BuildRequires: python-modules
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+%endif
%endif
%if %{with python3}
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
%endif
-Requires: python-modules
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This Library is mainly for those implementing a Terminal Emulator, or
+This library is mainly for those implementing a Terminal Emulator, or
programs that carefully produce output to be interpreted by one.
-# %%description -l pl.UTF-8
+%description -l pl.UTF-8
+Ta biblioteka przydaje się głównie implementującym emulator terminala
+lub programom uważnie tworzących wyjście do interpretowania przez
+takowy.
%package -n python3-%{module}
-Summary: -
-Summary(pl.UTF-8): -
+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
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.4
%description -n python3-%{module}
-This Library is mainly for those implementing a Terminal Emulator, or
+This library is mainly for those implementing a Terminal Emulator, or
programs that carefully produce output to be interpreted by one.
-# %%description -n python3-%{module} -l pl.UTF-8
-
-%package apidocs
-Summary: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
-Group: Documentation
-
-%description apidocs
-API documentation for %{module}.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+%description -n python3-%{module} -l pl.UTF-8
+Ta biblioteka przydaje się głównie implementującym emulator terminala
+lub programom uważnie tworzących wyjście do interpretowania przez
+takowy.
%prep
%setup -q -n %{module}-%{version}
-#%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
-
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} -m pytest wcwidth/tests
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
-%endif
+%py3_build
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+%if %{with tests}
+%{__python3} -m pytest wcwidth/tests
+%endif
%endif
%install
@@ -84,16 +86,15 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%py_install
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
%py_postclean
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/wcwidth/tests
%endif
%if %{with python3}
%py3_install
-%endif
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/wcwidth/tests
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -101,21 +102,15 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.rst
-%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%doc LICENSE.txt README.rst
+%{py_sitescriptdir}/wcwidth
+%{py_sitescriptdir}/wcwidth-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc LICENSE.txt README.rst
+%{py3_sitescriptdir}/wcwidth
+%{py3_sitescriptdir}/wcwidth-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-wcwidth.git/commitdiff/c0e42432115051fd002a9ed4453ce227b8c45583
More information about the pld-cvs-commit
mailing list