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