%global srcname praw %if 0%{?fedora} > 12 %global with_python3 1 %else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} %endif Name: python-%{srcname} Version: 2.1.21 Release: 1%{?dist} Summary: A python package that allows for simple access to reddit's API License: GPLv3+ URL: https://github.com/praw-dev/praw/ Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz Patch0: %{srcname}-2.1.19-update.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-six Requires: python-requests %description PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. %if 0%{?with_python3} %package -n python3-%{srcname} Summary: A python package that allows for simple access to reddit's API BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-six Requires: python3-requests %description -n python3-%{srcname} PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. %endif %prep %setup -q -n %{srcname}-%{version} %patch0 -p0 -b .update rm -rf %{srcname}.egg-info %if 0%{?with_python3} cp -a . %{py3dir} %endif %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python2} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %files %doc CHANGES.rst README.rst COPYING %{_bindir}/%{srcname}-multiprocess %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{srcname} %doc CHANGES.rst README.rst COPYING %{_bindir}/%{srcname}-multiprocess %{python3_sitelib}/* %endif # with_python3 %changelog * Sun Apr 05 2015 Fabian Affolter - 2.1.21-1 - Update to latest upstream release 2.1.21 (rhbz#1206410) * Fri Jan 23 2015 Fabian Affolter - 2.1.20-1 - Update to latest upstream release (rhbz#1185340) * Sun Dec 07 2014 Fabian Affolter - 2.1.19-2 - Add requirement python-requests (rhbz#1171444) * Wed Nov 05 2014 Fabian Affolter - 2.1.19-1 - Update to new upstream release (rhbz#1070176) - Update patch0 * Sun Sep 14 2014 Fabian Affolter - 2.1.18-2 - Add python3 subpackage (rhbz#1135689) * Sat Aug 23 2014 Fabian Affolter - 2.1.18-1 - Update to latest upstream version 2.1.18 * Mon Jul 14 2014 Fabian Affolter - 2.1.17-1 - Disable update_checker (rhbz#1103097) - Update to latest upstream version 2.1.17 * Sat Jun 07 2014 Fedora Release Engineering - 2.1.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat May 24 2014 Fabian Affolter - 2.1.16-1 - Spec file update - Update to latest upstream version 2.1.16 * Sun Aug 04 2013 Fedora Release Engineering - 1.0.15-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.0.15-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Nov 10 2012 Elad Alfassa - 1.0.15-3 - Fix more issues from review * Sat Nov 10 2012 Elad Alfassa - 1.0.15-2 - Fix few minor problems from review * Sat Nov 10 2012 Elad Alfassa - 1.0.15-1 - Initial packaging for Feora