]> git.pld-linux.org Git - packages/python-wcwidth.git/commitdiff
- updated to 0.1.7, cleaned up the mess auto/th/python-wcwidth-0.1.7-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Sep 2019 05:53:25 +0000 (07:53 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Sep 2019 05:53:25 +0000 (07:53 +0200)
python-wcwidth.spec

index a6f1faec4b1d2d059de61f912749df715d583fbf..8887e2e918fd0bbdce5ed50b250acccc95de129e 100644 (file)
@@ -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
This page took 0.143369 seconds and 4 git commands to generate.