75755bb
# Created by pyp2rpm-0.5.2
75755bb
%global pypi_name progress
7e487e6
%global with_python3 0%{?fedora}
75755bb
75755bb
Name:           python-%{pypi_name}
75755bb
Version:        1.2
bb4ece1
Release:        15%{?dist}
75755bb
Summary:        Easy to use progress bars
75755bb
75755bb
License:        ISC
75755bb
URL:            http://github.com/verigak/progress/
75755bb
Source0:        https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
75755bb
BuildArch:      noarch
75755bb
 
75755bb
BuildRequires:  python2-devel
bb4ece1
BuildRequires:  python2-setuptools
75755bb
 
75755bb
%if %{?with_python3}
75755bb
BuildRequires:  python3-devel
75755bb
BuildRequires:  python3-setuptools
75755bb
%endif # if with_python3
75755bb
2e851c8
Patch1:         0001-possibly-enlarge-dequeue-to-give-us-better-statistic.patch
2e851c8
Patch2:         0002-make-the-progress-bar-more-stable.patch
2e851c8
fa4712f
%global _description\
fa4712f
Collection of easy to use progress bars and spinners.\
fa4712f
fa4712f
fa4712f
%description %_description
75755bb
fa4712f
%package -n python2-%{pypi_name}
fa4712f
Summary: %summary
fa4712f
%{?python_provide:%python_provide python2-%{pypi_name}}
fa4712f
fa4712f
%description -n python2-%{pypi_name} %_description
75755bb
75755bb
%if 0%{?with_python3}
75755bb
%package -n     python3-%{pypi_name}
75755bb
Summary:        Easy to use progress bars
75755bb
75755bb
%description -n python3-%{pypi_name}
75755bb
Collection of easy to use progress bars and spinners.
75755bb
%endif # with_python3
75755bb
75755bb
75755bb
%prep
2e851c8
%autosetup -p1 -n %{pypi_name}-%{version}
75755bb
# Remove bundled egg-info
75755bb
rm -rf %{pypi_name}.egg-info
75755bb
75755bb
%if 0%{?with_python3}
75755bb
rm -rf %{py3dir}
75755bb
cp -a . %{py3dir}
75755bb
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
75755bb
%endif # with_python3
75755bb
75755bb
%build
75755bb
%{__python2} setup.py build
75755bb
75755bb
%if 0%{?with_python3}
75755bb
pushd %{py3dir}
75755bb
%{__python3} setup.py build
75755bb
popd
75755bb
%endif # with_python3
75755bb
75755bb
%install
75755bb
# Must do the subpackages' install first because the scripts in /usr/bin are
75755bb
# overwritten with every setup.py install (and we want the python2 version
75755bb
# to be the default for now).
75755bb
%if 0%{?with_python3}
75755bb
pushd %{py3dir}
75755bb
%{__python3} setup.py install --skip-build --root %{buildroot}
75755bb
popd
75755bb
%endif # with_python3
75755bb
75755bb
%{__python2} setup.py install --skip-build --root %{buildroot}
75755bb
fa4712f
%files -n python2-%{pypi_name}
75755bb
%doc README.rst LICENSE
75755bb
%{python2_sitelib}/%{pypi_name}
75755bb
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
75755bb
75755bb
%if 0%{?with_python3}
75755bb
%files -n python3-%{pypi_name}
75755bb
%doc README.rst LICENSE
75755bb
%{python3_sitelib}/%{pypi_name}
75755bb
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
75755bb
%endif # with_python3
75755bb
75755bb
%changelog
bb4ece1
* Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2-15
bb4ece1
- Update Python 2 dependency declarations to new packaging standards
bb4ece1
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
bb4ece1
fa4712f
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2-14
fa4712f
- Python 2 binary package renamed to python2-progress
fa4712f
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
fa4712f
3ac39b9
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-13
3ac39b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3ac39b9
8ece51e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-12
8ece51e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8ece51e
70654b4
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2-11
70654b4
- Rebuild for Python 3.6
70654b4
7e487e6
* Thu Dec 08 2016 Pavel Raiskup <praiskup@redhat.com> - 1.2-10
7e487e6
- keep enabled python3 subpackage only in fedora, and merge into epel7
7e487e6
2e851c8
* Tue Nov 01 2016 Pavel Raiskup <praiskup@redhat.com> - 1.2-9
2e851c8
- fix avg counter for copr-cli (rhbz#1299634)
2e851c8
7a12183
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-8
7a12183
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7a12183
87a9055
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
87a9055
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
87a9055
5664eda
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
5664eda
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
5664eda
b079a9e
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
b079a9e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b079a9e
44a95ed
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
44a95ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
44a95ed
b96a491
* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-3
b96a491
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
b96a491
75755bb
* Tue Feb 18 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-2
75755bb
- Add missing BR: python{,3}-setuptools
75755bb
75755bb
* Tue Feb 18 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-1
75755bb
- Initial package.