b000297
%if 0%{?rhel} && 0%{?rhel} <= 7
b000297
%bcond_with python3
Fabio Alessandro Locati c9b0399
%else
b000297
%bcond_without python3
Fabio Alessandro Locati c9b0399
%endif
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
# Disable tests since tox.ini is not found properly. I'll try to enable them back ASAP
b000297
%bcond_with tests
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%global pypi_name wcwidth
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
Name:           python-%{pypi_name}
b000297
Version:        0.1.7
cb9cd34
Release:        4%{?dist}
Fabio Alessandro Locati c9b0399
Summary:        Measures number of Terminal column cells of wide-character codes
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
License:        MIT
Fabio Alessandro Locati c9b0399
URL:            https://github.com/jquast/wcwidth
b000297
Source0:        https://pypi.io/packages/source/w/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Fabio Alessandro Locati c9b0399
BuildArch:      noarch
Fabio Alessandro Locati c9b0399
 
Fabio Alessandro Locati c9b0399
%description
Fabio Alessandro Locati c9b0399
This API is mainly for Terminal Emulator implementors, or those writing programs
Fabio Alessandro Locati c9b0399
that expect to interpreted by a terminal emulator and wish to determine the
Fabio Alessandro Locati c9b0399
printable width of a string on a Terminal.
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%package -n     python2-%{pypi_name}
b000297
BuildRequires:  python2-devel
b000297
BuildRequires:  python-setuptools
b000297
%if %{with tests}
b000297
BuildRequires:  python-tox
b000297
%endif # with tests
Fabio Alessandro Locati c9b0399
Summary:        Measures number of Terminal column cells of wide-character codes
Fabio Alessandro Locati c9b0399
%{?python_provide:%python_provide python2-%{pypi_name}}
Fabio Alessandro Locati cc767fd
%{?el6:Provides: python-%{pypi_name}}
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%description -n python2-%{pypi_name}
Fabio Alessandro Locati c9b0399
This API is mainly for Terminal Emulator implementors, or those writing programs
Fabio Alessandro Locati c9b0399
that expect to interpreted by a terminal emulator and wish to determine the
Fabio Alessandro Locati c9b0399
printable width of a string on a Terminal.
Fabio Alessandro Locati c9b0399
b000297
%if %{with python3}
Fabio Alessandro Locati c9b0399
%package -n     python3-%{pypi_name}
Fabio Alessandro Locati c9b0399
Summary:        Measures number of Terminal column cells of wide-character codes
b000297
BuildRequires:  python3-devel
b000297
BuildRequires:  python3-setuptools
b000297
%if %{with tests}
b000297
BuildRequires:  python3-tox 
b000297
%endif # with tests
Fabio Alessandro Locati c9b0399
%{?python_provide:%python_provide python3-%{pypi_name}}
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%description -n python3-%{pypi_name}
Fabio Alessandro Locati c9b0399
This API is mainly for Terminal Emulator implementors, or those writing programs
Fabio Alessandro Locati c9b0399
that expect to interpreted by a terminal emulator and wish to determine the
Fabio Alessandro Locati c9b0399
printable width of a string on a Terminal.
b000297
%endif # with python3
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%prep
Fabio Alessandro Locati c9b0399
%setup -q -n %{pypi_name}-%{version}
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%build
Fabio Alessandro Locati c9b0399
%py2_build
b000297
%if %{with python3}
Fabio Alessandro Locati c9b0399
%py3_build
b000297
%endif # with python3
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%install
Fabio Alessandro Locati c9b0399
%py2_install
b000297
%if %{with python3}
b000297
%py3_install
b000297
%endif # with python3
Fabio Alessandro Locati c9b0399
b000297
%if %{with tests}
Fabio Alessandro Locati c9b0399
%check
Fabio Alessandro Locati c9b0399
%{__python2} setup.py test
b000297
%if %{with python3}
Fabio Alessandro Locati c9b0399
%{__python3} setup.py test
b000297
%endif # with python3
b000297
%endif # with tests
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%files -n python2-%{pypi_name} 
Fabio Alessandro Locati c9b0399
%{!?_licensedir:%global license %doc}
Fabio Alessandro Locati c9b0399
%doc README.rst
Fabio Alessandro Locati f953814
%license LICENSE.txt
Fabio Alessandro Locati c9b0399
%{python2_sitelib}/%{pypi_name}
Fabio Alessandro Locati c9b0399
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
Fabio Alessandro Locati c9b0399
b000297
%if %{with python3}
Fabio Alessandro Locati c9b0399
%files -n python3-%{pypi_name} 
Fabio Alessandro Locati c9b0399
%doc README.rst
Fabio Alessandro Locati f953814
%license LICENSE.txt
Fabio Alessandro Locati c9b0399
%{python3_sitelib}/%{pypi_name}
Fabio Alessandro Locati c9b0399
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
b000297
%endif # with python3
Fabio Alessandro Locati c9b0399
Fabio Alessandro Locati c9b0399
%changelog
cb9cd34
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-4
cb9cd34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cb9cd34
71061b0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-3
71061b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
71061b0
6d755c0
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.1.7-2
6d755c0
- Rebuild for Python 3.6
6d755c0
b000297
* Tue Dec 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.7-1
b000297
- Update to 0.1.7
b000297
ccc8cd8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-4
ccc8cd8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ccc8cd8
b48f698
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-3
b48f698
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b48f698
b000297
* Tue Jan 12 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.6-2
Fabio Alessandro Locati cc767fd
- Provide python-wcwidth for EL6
Fabio Alessandro Locati cc767fd
b000297
* Sat Jan 09 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.6-1
Fabio Alessandro Locati f953814
- Update to new upstream
Fabio Alessandro Locati f953814
- Remove external LICENSE thanks to the new version
Fabio Alessandro Locati f953814
b000297
* Wed Jan 06 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.5-2
Fabio Alessandro Locati c9b0399
- Remove shabang from file that was not executable
Fabio Alessandro Locati c9b0399
b000297
* Tue Dec 29 2015 Fabio Alessandro Locati <fale@fedoraproject.org> - 0.1.5-1
Fabio Alessandro Locati c9b0399
- Initial package.