%if 0%{?fedora} %global with_python3 1 %endif %global modname pypump %global distname PyPump Name: python-pypump Version: 0.4 Release: 1%{?dist} Summary: Python Pump.io library Group: Development/Libraries License: GPLv3+ URL: http://pypi.python.org/pypi/PyPump Source0: http://pypi.python.org/packages/source/P/%{distname}/%{distname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-requests BuildRequires: python-oauthlib BuildRequires: python-dateutil Requires: python-requests Requires: python-oauthlib Requires: python-dateutil %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-requests BuildRequires: python3-oauthlib BuildRequires: python3-dateutil %endif %description Pump.io is a socially oriented federated network. It provides a way to post notes and images as well and subscribe to other people to get updates on what they post. PyPump provides an interface to the pump.io API's. The aim is to provide very natural pythonic representations of Notes, Images, People, etc... allowing you to painlessly interact with them. %if 0%{?with_python3} %package -n python3-pypump Summary: Python Pump.io library Group: Development/Libraries Requires: python-requests Requires: python-oauthlib Requires: python-dateutil %description -n python3-pypump Pump.io is a socially oriented federated network. It provides a way to post notes and images as well and subscribe to other people to get updates on what they post. PyPump provides an interface to the pump.io API's. The aim is to provide very natural pythonic representations of Notes, Images, People, etc... allowing you to painlessly interact with them. %endif %prep %setup -q -n %{distname}-%{version} # Remove bundled egg-info in case it exists rm -rf %{distname}.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif %{__python} setup.py install -O1 --skip-build --root=%{buildroot} %files %doc README.rst COPYING docs/ AUTHORS.md %{python_sitelib}/%{modname}/ %{python_sitelib}/%{distname}-%{version}* %if 0%{?with_python3} %files -n python3-pypump %doc README.rst COPYING docs/ AUTHORS.md %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{distname}-%{version}-* %endif %changelog * Thu Oct 31 2013 Ralph Bean - 0.4-1 - initial package for Fedora