# # Conditional build: %bcond_without tests # do not perform "make test" %bcond_without python2 # CPython 2.x module %bcond_with python3 # CPython 3.x module %define module progressbar Summary: Text progressbar library for python Name: python-%{module} Version: 2.3 Release: 4 License: LGPL Group: Libraries/Python Source0: https://python-progressbar.googlecode.com/files/progressbar-%{version}.tar.gz # Source0-md5: 4f904e94b783b4c6e71aa74fd2432c59 URL: https://code.google.com/p/python-progressbar/ BuildRequires: rpmbuild(macros) >= 1.710 BuildRequires: python-distribute BuildRequires: rpm-pythonprov BuildRequires: sed >= 4.0 %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-modules %endif Requires: python-modules BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description This library provides a text mode progressbar. This is tipically used to display the progress of a long running operation, providing a visual clue that processing is underway. %package -n python3-%{module} Summary: Text progressbar library for python Group: Libraries/Python %description -n python3-%{module} This library provides a text mode progressbar. This is tipically used to display the progress of a long running operation, providing a visual clue that processing is underway. %prep %setup -q -n %{module}-%{version} %build %if %{with python2} %py_build %{?with_tests:test} %endif %if %{with python3} %py3_build %{?with_tests:test} %endif %install rm -rf $RPM_BUILD_ROOT %if %{with python2} %py_install %py_postclean %endif %if %{with python3} %py3_install %endif %clean rm -rf $RPM_BUILD_ROOT %if %{with python2} %files %defattr(644,root,root,755) %doc README.txt %{py_sitescriptdir}/%{module} %if "%{py_ver}" > "2.4" %{py_sitescriptdir}/%{module}-*.egg-info %endif %endif %if %{with python3} %files -n python3-%{module} %defattr(644,root,root,755) %doc README.txt %{py3_sitescriptdir}/%{module} %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info %endif