diff --git a/python-wcwidth.spec b/python-wcwidth.spec index 8e41d75..69cebc4 100644 --- a/python-wcwidth.spec +++ b/python-wcwidth.spec @@ -1,11 +1,12 @@ -Name: python-wcwidth -Version: 0.2.5 -Release: 2 -Summary: A Python library that measures the width of unicode strings rendered to a terminal -License: MIT -URL: https://github.com/jquast/wcwidth -Source0: https://pypi.io/packages/source/w/wcwidth/wcwidth-%{version}.tar.gz -BuildArch: noarch +%global _empty_manifest_terminate_build 0 +Name: python-wcwidth +Version: 0.2.6 +Release: 1 +Summary: A Python library that measures the width of unicode strings rendered to a terminal +License: MIT +URL: https://github.com/jquast/wcwidth +Source0: https://files.pythonhosted.org/packages/5e/5f/1e4bd82a9cc1f17b2c2361a2d876d4c38973a997003ba5eb400e8a932b6c/wcwidth-0.2.6.tar.gz +BuildArch: noarch %description This library is mainly for those implementing a Terminal Emulator, or @@ -15,14 +16,11 @@ and wcswidth(3) C functions of which this python module's functions precisely copy. These functions return the number of cells a unicode string is expected to occupy. - -%package -n python3-wcwidth -Summary: A Python library that measures the width of unicode strings rendered to a terminal - -BuildRequires: python3-devel python3-setuptools - -%{?python_provide:%python_provide python3-wcwidth} - +%package -n python3-wcwidth +Summary: A Python library that measures the width of unicode strings rendered to a terminal +Provides: python-wcwidth = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: python3-setuptools %description -n python3-wcwidth This library is mainly for those implementing a Terminal Emulator, or programs that carefully produce output to be interpreted by one. @@ -31,22 +29,65 @@ and wcswidth(3) C functions of which this python module's functions precisely copy. These functions return the number of cells a unicode string is expected to occupy. +%package help +Summary: Development documents and examples for wcwidth +Provides: python3-wcwidth-doc +%description help +This library is mainly for those implementing a Terminal Emulator, or +programs that carefully produce output to be interpreted by one. +POSIX.1-2001 and POSIX.1-2008 conforming systems provide wcwidth(3) +and wcswidth(3) C functions of which this python module's functions +precisely copy. These functions return the number of cells a unicode +string is expected to occupy. + %prep -%autosetup -n wcwidth-%{version} -p1 +%autosetup -n wcwidth-%{version} %build %py3_build %install %py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . +%files -n python3-wcwidth -f filelist.lst +%dir %{python3_sitelib}/* +%license LICENSE -%files -n python3-wcwidth -%doc README.rst LICENSE -%{python3_sitelib}/wcwidth -%{python3_sitelib}/wcwidth-%{version}-py%{python3_version}.egg-info +%files help -f doclist.lst +%{_docdir}/* %changelog +* Fri Mar 17 2023 wangjunqi - 0.2.6-1 +- Update package to version 0.2.6 + * Wed Mar 30 2022 wangkai - 0.2.5-2 - Fix compilation failures diff --git a/wcwidth-0.2.5.tar.gz b/wcwidth-0.2.5.tar.gz deleted file mode 100644 index 3bfe754..0000000 Binary files a/wcwidth-0.2.5.tar.gz and /dev/null differ diff --git a/wcwidth-0.2.6.tar.gz b/wcwidth-0.2.6.tar.gz new file mode 100644 index 0000000..e2dbc56 Binary files /dev/null and b/wcwidth-0.2.6.tar.gz differ