%global modname libpagure %if 0%{?fedora} %global with_python3 1 %endif Name: python-libpagure Version: 0.5 Release: 1%{?dist} Summary: A Python library for Pagure APIs Group: Applications/Internet License: GPLv2+ URL: https://pagure.io/libpagure/ Source0: https://pagure.io/releases/libpagure/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-requests %description A Python library for Pagure APIs %if 0%{?with_python3} %package -n python3-libpagure Summary: A Python library for Pagure APIs BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-requests %description -n python3-libpagure A Python library for Pagure APIs %endif %prep %setup -q -n %{modname}-%{version} %build %{__python2} setup.py build %if 0%{?with_python3} %{__python3} setup.py build %endif %install %{__python2} setup.py install -O1 --skip-build \ --install-data=%{_datadir} --root %{buildroot} %if 0%{?with_python3} %{__python3} setup.py install -O1 --skip-build \ --install-data=%{_datadir} --root %{buildroot} %endif %files %doc README.md %license LICENSE.txt %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-libpagure %doc README.md %license LICENSE.txt %{python3_sitelib}/* %endif %changelog * Thu Nov 26 2015 Sayan Chowdhury 0.5-1 - Update the source to 0.5 * Tue Nov 10 2015 Sayan Chowdhury 0.4-1 - Initial packaging