Initial commit rhbz#1066304
This commit is contained in:
parent
fc8898953f
commit
75755bbe1a
3 changed files with 87 additions and 0 deletions
85
python-progress.spec
Normal file
85
python-progress.spec
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# Created by pyp2rpm-0.5.2
|
||||
%global pypi_name progress
|
||||
%global with_python3 1
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.2
|
||||
Release: 2%{?dist}
|
||||
Summary: Easy to use progress bars
|
||||
|
||||
License: ISC
|
||||
URL: http://github.com/verigak/progress/
|
||||
Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
%if %{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif # if with_python3
|
||||
|
||||
%description
|
||||
Collection of easy to use progress bars and spinners.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: Easy to use progress bars
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
Collection of easy to use progress bars and spinners.
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{pypi_name}-%{version}
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{pypi_name}.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
%{__python2} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%install
|
||||
# Must do the subpackages' install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install (and we want the python2 version
|
||||
# to be the default for now).
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
||||
|
||||
%files
|
||||
%doc README.rst LICENSE
|
||||
%{python2_sitelib}/%{pypi_name}
|
||||
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
%doc README.rst LICENSE
|
||||
%{python3_sitelib}/%{pypi_name}
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Tue Feb 18 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-2
|
||||
- Add missing BR: python{,3}-setuptools
|
||||
|
||||
* Tue Feb 18 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2-1
|
||||
- Initial package.
|
||||
Loading…
Add table
Add a link
Reference in a new issue