4a59425
%bcond_without check
6956ef5
6956ef5
Name:           python-humanize
29b0325
Version:        0.5.1
92d1355
Release:        18%{?dist}
6956ef5
Summary:        Turns dates in to human readable format, e.g '3 minutes ago'
6956ef5
6956ef5
License:        MIT
6956ef5
URL:            https://github.com/jmoiron/humanize
4a59425
Source0:        %{url}/archive/%{version}.tar.gz
6956ef5
6956ef5
BuildArch:      noarch
6956ef5
BuildRequires:  python3-devel
6956ef5
BuildRequires:  python3-setuptools
4a59425
%if %{with check}
4a59425
BuildRequires:  python3-mock
6956ef5
%endif
6956ef5
6956ef5
c002781
%global _description\
c002781
This modest package contains various common humanization utilities, like turning\
c002781
a number into a fuzzy human readable duration ('3 minutes ago') or into a human\
c002781
readable size or throughput.\
c002781
6956ef5
c002781
%description %_description
c002781
6956ef5
%package -n python3-humanize
4a59425
Summary: %summary
4a59425
%{?python_provide:%python_provide python3-humanize}
6956ef5
6956ef5
%description -n python3-humanize
6956ef5
This modest package contains various common humanization utilities, like turning
6956ef5
a number into a fuzzy human readable duration ('3 minutes ago') or into a human
6956ef5
readable size or throughput.
6956ef5
6956ef5
%prep
6956ef5
%setup -q -n humanize-%{version}
6956ef5
6956ef5
# Remove shebangs from libs.
6956ef5
for lib in humanize/time.py humanize/filesize.py humanize/number.py; do
6956ef5
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
6956ef5
 touch -r $lib $lib.new && mv $lib.new $lib
6956ef5
done
6956ef5
6956ef5
%build
4a59425
%py3_build
6956ef5
6956ef5
%install
4a59425
%py3_install
6956ef5
6956ef5
%find_lang humanize
6956ef5
6956ef5
4a59425
%if %{with check}
6956ef5
%check
4a59425
%{__python3} setup.py test
f6a25f9
%endif
6956ef5
4a59425
%files -n python3-humanize -f humanize.lang
6956ef5
%doc README.rst LICENCE
6956ef5
%dir %{python3_sitelib}/humanize
6956ef5
%{python3_sitelib}/humanize/*.py
6956ef5
%{python3_sitelib}/humanize/__pycache__
6956ef5
%{python3_sitelib}/humanize-%{version}-py%{python3_version}.egg-info
4a59425
%exclude %{python3_sitelib}/humanize/locale/*/LC_MESSAGES/*.po
6956ef5
6956ef5
%changelog
92d1355
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-18
92d1355
- Rebuilt for Python 3.8
92d1355
1dcd3cd
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-17
1dcd3cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
1dcd3cd
3b0f493
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-16
3b0f493
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3b0f493
4a59425
* Thu Jul 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-15
4a59425
- Clean spec, remove python2 subpackage
4a59425
- Run tests
4a59425
1b7c325
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-14
1b7c325
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1b7c325
317e594
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-13
317e594
- Rebuilt for Python 3.7
317e594
affc0ca
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.1-12
affc0ca
- Update Python 2 dependency declarations to new packaging standards
affc0ca
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
affc0ca
4f11e31
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-11
4f11e31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4f11e31
f526603
* Thu Dec 07 2017 Merlin Mathesius <mmathesi@redhat.com> - 0.5.1-10
f526603
- Cleanup spec file conditionals
f526603
c002781
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.1-9
c002781
- Python 2 binary package renamed to python2-humanize
c002781
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
c002781
b94e7a1
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-8
b94e7a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b94e7a1
824036a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-7
824036a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
824036a
aa65bec
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.5.1-6
aa65bec
- Rebuild for Python 3.6
aa65bec
14a4e71
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
14a4e71
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
14a4e71
824545b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-4
824545b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
824545b
Robert Kuska 368eecc
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 0.5.1-3
Robert Kuska 368eecc
- Rebuilt for Python3.5 rebuild
Robert Kuska 368eecc
8e0ba5e
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
8e0ba5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8e0ba5e
29b0325
* Mon Jun 1 2015 Steve Traylen <steve.traylen@cern.ch> 0.5.1-1
29b0325
- New 0.5.1
29b0325
4c65e5c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
4c65e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4c65e5c
02385f2
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.5-5
02385f2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
02385f2
f6a25f9
* Wed May 14 2014 Steve Traylen <steve.traylen@cern.ch> 0.5-4
f6a25f9
- lang fixes for .el6 target.
f6a25f9
6956ef5
* Wed Apr 23 2014 Steve Traylen <steve.traylen@cern.ch> 0.5-3
6956ef5
- Use __python2 rather than __python throughout. - rhbz#1088882
6956ef5
6956ef5
* Tue Apr 22 2014 Steve Traylen <steve.traylen@cern.ch> 0.5-2
6956ef5
- Add python3 package - rhbz#1088882.
6956ef5
6956ef5
* Thu Apr 17 2014 Steve Traylen <steve.traylen@cern.ch> 0.5-1
6956ef5
- First release
6956ef5