ef7e0d7
%bcond_with tests
ef7e0d7
%bcond_with docs
ef7e0d7
%bcond_with update_checker
Fabian Affolter e490e52
ef7e0d7
%global pypi_name praw
ef7e0d7
ef7e0d7
Name:           python-%{pypi_name}
34d2aca
Version:        3.6.0
ef7e0d7
Release:        1%{?dist}
ef7e0d7
Summary:        A python package that allows for simple access to reddit's API
2b02d74
2b02d74
License:        GPLv3+
ef7e0d7
URL:            https://praw.readthedocs.org
34d2aca
Source0:        https://github.com/praw-dev/praw/archive/v%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
ef7e0d7
Patch0:         praw-3.5.0-remove_update_check.patch
2b02d74
BuildArch:      noarch
82c42df
82c42df
BuildRequires:  python-setuptools
ef7e0d7
BuildRequires:  python2-devel
ef7e0d7
BuildRequires:  python3-setuptools
Fabian Affolter 7dd9855
BuildRequires:  python3-devel
ef7e0d7
%if %{with tests}
ef7e0d7
BuildRequires:  mock
ef7e0d7
BuildRequires:  python-betamax < 0.8
ef7e0d7
BuildRequires:  python-betamax >= 0.7.1
ef7e0d7
BuildRequires:  python-betamax-matchers < 0.3
ef7e0d7
BuildRequires:  python-betamax-matchers >= 0.2.0
ef7e0d7
BuildRequires:  python-betamax-serializers < 0.3
ef7e0d7
BuildRequires:  python-betamax-serializers >= 0.2
ef7e0d7
BuildRequires:  python-pytest
ef7e0d7
BuildRequires:  python-pytest-runner
ef7e0d7
BuildRequires:  python3-mock
ef7e0d7
BuildRequires:  python3-betamax < 0.8
ef7e0d7
BuildRequires:  python3-betamax >= 0.7.1
ef7e0d7
BuildRequires:  python3-betamax-matchers < 0.3
ef7e0d7
BuildRequires:  python3-betamax-matchers >= 0.2.0
ef7e0d7
BuildRequires:  python3-betamax-serializers < 0.3
ef7e0d7
BuildRequires:  python3-betamax-serializers >= 0.2
ef7e0d7
BuildRequires:  python3-pytest
ef7e0d7
BuildRequires:  python3-pytest-runner
ef7e0d7
%endif
ef7e0d7
%if %{with docs}
ef7e0d7
BuildRequires:  python-sphinx
ef7e0d7
%endif
Fabian Affolter 7dd9855
Fabian Affolter 7dd9855
%description
Fabian Affolter 7dd9855
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that
Fabian Affolter 7dd9855
allows for simple access to reddit's API.
Fabian Affolter 7dd9855
ef7e0d7
%package -n     python2-%{pypi_name}
34d2aca
Summary:        %{summary}
ef7e0d7
%{?python_provide:%python_provide python2-%{pypi_name}}
82c42df
ef7e0d7
Requires:       python-decorator >= 4.0.9
ef7e0d7
Requires:       python-decorator < 4.1
ef7e0d7
Requires:       python-requests >= 2.3.0
ef7e0d7
Requires:       python-six >= 1.10
ef7e0d7
%{?with_update_checker:Requires:       python-update-checker = 0.11}
ef7e0d7
%description -n python2-%{pypi_name}
82c42df
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that
82c42df
allows for simple access to reddit's API.
2b02d74
ef7e0d7
%package -n     python3-%{pypi_name}
34d2aca
Summary:        %{summary}
ef7e0d7
%{?python_provide:%python_provide python3-%{pypi_name}}
Fabian Affolter e490e52
ef7e0d7
Requires:       python3-decorator >= 4.0.9
ef7e0d7
Requires:       python3-decorator < 4.1
ef7e0d7
Requires:       python3-requests >= 2.3.0
ef7e0d7
Requires:       python3-six >= 1.10
ef7e0d7
%{?with_update_checker:Requires:       python3-update-checker = 0.11}
ef7e0d7
%description -n python3-%{pypi_name}
ef7e0d7
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that
ef7e0d7
allows for simple access to reddit's API.
Fabian Affolter e490e52
ef7e0d7
%if %{with docs}
ef7e0d7
%package -n python-%{pypi_name}-doc
ef7e0d7
Summary:        A python package that allows for simple access to reddit's API
ef7e0d7
%description -n python-%{pypi_name}-doc
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.
ef7e0d7
%endif
Fabian Affolter e490e52
2b02d74
%prep
ef7e0d7
%setup -n %{pypi_name}-%{version}
ef7e0d7
%{!?with_update_checker:%patch0 -p1}
2b02d74
2b02d74
%build
Fabian Affolter 7dd9855
%py2_build
Fabian Affolter 7dd9855
%py3_build
ef7e0d7
%if %{with docs}
ef7e0d7
sphinx-build docs html
ef7e0d7
rm -rf html/.{doctrees,buildinfo}
ef7e0d7
%endif
2b02d74
2b02d74
%install
Fabian Affolter 7dd9855
%py2_install
ef7e0d7
cp %{buildroot}/%{_bindir}/praw-multiprocess %{buildroot}/%{_bindir}/praw-multiprocess-2
ef7e0d7
ln -sf %{_bindir}/praw-multiprocess-2 %{buildroot}/%{_bindir}/praw-multiprocess-%{python2_version}
Fabian Affolter 7dd9855
%py3_install
ef7e0d7
cp %{buildroot}/%{_bindir}/praw-multiprocess %{buildroot}/%{_bindir}/praw-multiprocess-3
ef7e0d7
ln -sf %{_bindir}/praw-multiprocess-3 %{buildroot}/%{_bindir}/praw-multiprocess-%{python3_version}
ef7e0d7
ef7e0d7
%if %{with tests}
ef7e0d7
%check
ef7e0d7
%{__python2} setup.py test
ef7e0d7
%{__python3} setup.py test
ef7e0d7
%endif
Fabian Affolter 7dd9855
ef7e0d7
%files -n python2-%{pypi_name}
ef7e0d7
%doc README.rst
Fabian Affolter 7dd9855
%license COPYING
ef7e0d7
%{_bindir}/praw-multiprocess-2
ef7e0d7
%{_bindir}/praw-multiprocess-%{python2_version}
ef7e0d7
%{python2_sitelib}/%{pypi_name}
ef7e0d7
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
Fabian Affolter e490e52
ef7e0d7
%files -n python3-%{pypi_name}
ef7e0d7
%doc README.rst
Fabian Affolter 7dd9855
%license COPYING
ef7e0d7
%{_bindir}/praw-multiprocess
ef7e0d7
%{_bindir}/praw-multiprocess-3
ef7e0d7
%{_bindir}/praw-multiprocess-%{python3_version}
ef7e0d7
%{python3_sitelib}/%{pypi_name}
ef7e0d7
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
ef7e0d7
ef7e0d7
%if %{with docs}
ef7e0d7
%files -n python-%{pypi_name}-doc
ef7e0d7
%doc html
ef7e0d7
%endif
2b02d74
2b02d74
%changelog
34d2aca
* Wed Nov 16 2016 Fabian Affolter <mail@fabian-affolter.ch> - 3.6.0-1
34d2aca
- Update to latest upstream release 3.6.0
34d2aca
ef7e0d7
* Fri Aug 26 2016 Fabio Alessandro Locati <fale@redhat.com> - 3.5.0-1
ef7e0d7
- Update to 3.5.0
ef7e0d7
- SPEC refactor
ef7e0d7
cdd41d2
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-2
cdd41d2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
cdd41d2
Fabian Affolter 7dd9855
* Mon Feb 22 2016 Fabian Affolter <mail@fabian-affolter.ch> - 3.4.0-1
Fabian Affolter 7dd9855
- Update to latest upstream release 3.4.0 (rhbz#1310641)
Fabian Affolter 7dd9855
8c0f571
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-4
8c0f571
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8c0f571
54accf1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-3
54accf1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
54accf1
ca4a6f4
* Fri Nov  6 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-2
ca4a6f4
- Only include the scipt in the python3 package.  The one in the python2
ca4a6f4
  package wouldn't function without manual intervention because it would
ca4a6f4
  require the python3-praw package but there was no dependency to it.
ca4a6f4
  Simply dropping it from the python-praw package also fixes the python-praw
ca4a6f4
  package to not require /usr/bin/python3
ca4a6f4
Fabian Affolter ca98098
* Tue Oct 06 2015 Fabian Affolter <mail@fabian-affolter.ch> - 3.3.0-1
Fabian Affolter ca98098
- Update to latest upstream release 3.3.0
Fabian Affolter ca98098
d9f061d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.21-2
d9f061d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d9f061d
Fabian Affolter 3f8f529
* Sun Apr 05 2015 Fabian Affolter <mail@fabian-affolter.ch> - 2.1.21-1
Fabian Affolter 3f8f529
- Update to latest upstream release 2.1.21 (rhbz#1206410)
Fabian Affolter 3f8f529
Fabian Affolter 5f53a8d
* Fri Jan 23 2015 Fabian Affolter <mail@fabian-affolter.ch> - 2.1.20-1
Fabian Affolter 5f53a8d
- Update to latest upstream release (rhbz#1185340)
Fabian Affolter 5f53a8d
Fabian Affolter e00aca5
* Sun Dec 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