From ef7e0d77e14b3a8121e5972ecf9591aaa5b4245a Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Sep 01 2016 21:48:48 +0000 Subject: Update to 3.5.0 --- diff --git a/.gitignore b/.gitignore index f8a8d58..876a3eb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /praw-3.3.0.zip /praw-3.3.0.patch /praw-3.4.0.tar.gz +/praw-3.5.0.zip diff --git a/praw-3.4.0.patch b/praw-3.4.0.patch deleted file mode 100644 index 2d3548e..0000000 --- a/praw-3.4.0.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- praw-3.4.0/praw/__init__.py 2016-02-22 02:33:17.000000000 +0100 -+++ praw-3.4.0/praw/__init__.py.new 2016-02-22 17:05:16.475496339 +0100 -@@ -46,7 +46,7 @@ - from six.moves import html_entities, http_cookiejar - from six.moves.urllib.parse import parse_qs, urlparse, urlunparse - # pylint: enable=F0401 --from update_checker import update_check -+#from update_checker import update_check - from warnings import warn_explicit - - -@@ -309,7 +309,7 @@ - update_checked = False - - def __init__(self, user_agent, site_name=None, handler=None, -- disable_update_check=False, **kwargs): -+ disable_update_check=True, **kwargs): - """Initialize our connection with a reddit server. - - The user_agent is how your application identifies itself. Read the -@@ -369,7 +369,7 @@ - # Check for updates if permitted and this is the first Reddit instance - if not disable_update_check and not self.update_checked \ - and self.config.check_for_updates: -- update_check(__name__, __version__) -+ #update_check(__name__, __version__) - self.update_checked = True - - # Initial values diff --git a/praw-3.5.0-remove_update_check.patch b/praw-3.5.0-remove_update_check.patch new file mode 100644 index 0000000..509e181 --- /dev/null +++ b/praw-3.5.0-remove_update_check.patch @@ -0,0 +1,32 @@ +diff -ur praw-3.5.0.orig/praw/__init__.py praw-3.5.0/praw/__init__.py +--- praw-3.5.0.orig/praw/__init__.py 2016-08-24 15:06:20.476419685 +0100 ++++ praw-3.5.0/praw/__init__.py 2016-08-24 15:10:01.473127226 +0100 +@@ -46,7 +46,6 @@ + from six.moves import html_entities, http_cookiejar + from six.moves.urllib.parse import parse_qs, urlparse, urlunparse + # pylint: enable=F0401 +-from update_checker import update_check + from warnings import warn_explicit + + +@@ -371,7 +370,6 @@ + # Check for updates if permitted and this is the first Reddit instance + if not disable_update_check and not BaseReddit.update_checked \ + and self.config.check_for_updates: +- update_check(__name__, __version__) + BaseReddit.update_checked = True + + # Initial values +diff -ur praw-3.5.0.orig/setup.py praw-3.5.0/setup.py +--- praw-3.5.0.orig/setup.py 2016-08-24 15:06:20.475419709 +0100 ++++ praw-3.5.0/setup.py 2016-08-24 15:07:36.015610663 +0100 +@@ -40,8 +40,7 @@ + 'praw-multiprocess = praw.multiprocess:run']}, + install_requires=['decorator >=4.0.9, <4.1', + 'requests >=2.3.0', +- 'six ==1.10', +- 'update_checker ==0.11'], ++ 'six ==1.10'], + keywords='reddit api wrapper', + license='GPLv3', + long_description=README, diff --git a/python-praw.spec b/python-praw.spec index 9e45e2d..64b6ce5 100644 --- a/python-praw.spec +++ b/python-praw.spec @@ -1,72 +1,139 @@ -%global srcname praw -%global sum A python package that allows for simple access to reddit's API +%bcond_with tests +%bcond_with docs +%bcond_with update_checker -Name: python-%{srcname} -Version: 3.4.0 -Release: 2%{?dist} -Summary: %{sum} +%global pypi_name praw + +Name: python-%{pypi_name} +Version: 3.5.0 +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}-%{version}.patch +URL: https://praw.readthedocs.org +Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.zip +Patch0: praw-3.5.0-remove_update_check.patch BuildArch: noarch -BuildRequires: python2-devel BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python3-setuptools BuildRequires: python3-devel +%if %{with tests} +BuildRequires: mock +BuildRequires: python-betamax < 0.8 +BuildRequires: python-betamax >= 0.7.1 +BuildRequires: python-betamax-matchers < 0.3 +BuildRequires: python-betamax-matchers >= 0.2.0 +BuildRequires: python-betamax-serializers < 0.3 +BuildRequires: python-betamax-serializers >= 0.2 +BuildRequires: python-pytest +BuildRequires: python-pytest-runner +BuildRequires: python3-mock +BuildRequires: python3-betamax < 0.8 +BuildRequires: python3-betamax >= 0.7.1 +BuildRequires: python3-betamax-matchers < 0.3 +BuildRequires: python3-betamax-matchers >= 0.2.0 +BuildRequires: python3-betamax-serializers < 0.3 +BuildRequires: python3-betamax-serializers >= 0.2 +BuildRequires: python3-pytest +BuildRequires: python3-pytest-runner +%endif +%if %{with docs} +BuildRequires: python-sphinx +%endif %description PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. -%package -n python2-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python2-%{srcname}} +%package -n python2-%{pypi_name} +Summary: A python package that allows for simple access to reddit's API +%{?python_provide:%python_provide python2-%{pypi_name}} -Requires: python-six -Requires: python-requests - -%description -n python2-%{srcname} +Requires: python-decorator >= 4.0.9 +Requires: python-decorator < 4.1 +Requires: python-requests >= 2.3.0 +Requires: python-six >= 1.10 +%{?with_update_checker:Requires: python-update-checker = 0.11} +%description -n python2-%{pypi_name} PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. -%package -n python3-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python3-%{srcname}} +%package -n python3-%{pypi_name} +Summary: A python package that allows for simple access to reddit's API +%{?python_provide:%python_provide python3-%{pypi_name}} -Requires: python3-six -Requires: python3-requests +Requires: python3-decorator >= 4.0.9 +Requires: python3-decorator < 4.1 +Requires: python3-requests >= 2.3.0 +Requires: python3-six >= 1.10 +%{?with_update_checker:Requires: python3-update-checker = 0.11} +%description -n python3-%{pypi_name} +PRAW, an acronym for "Python Reddit API Wrapper", is a python package that +allows for simple access to reddit's API. -%description -n python3-%{srcname} +%if %{with docs} +%package -n python-%{pypi_name}-doc +Summary: A python package that allows for simple access to reddit's API +%description -n python-%{pypi_name}-doc PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. +%endif %prep -%setup -n %{srcname}-%{version} -%patch0 -p1 -b .update +%setup -n %{pypi_name}-%{version} +%{!?with_update_checker:%patch0 -p1} %build %py2_build %py3_build +%if %{with docs} +sphinx-build docs html +rm -rf html/.{doctrees,buildinfo} +%endif %install %py2_install +cp %{buildroot}/%{_bindir}/praw-multiprocess %{buildroot}/%{_bindir}/praw-multiprocess-2 +ln -sf %{_bindir}/praw-multiprocess-2 %{buildroot}/%{_bindir}/praw-multiprocess-%{python2_version} %py3_install +cp %{buildroot}/%{_bindir}/praw-multiprocess %{buildroot}/%{_bindir}/praw-multiprocess-3 +ln -sf %{_bindir}/praw-multiprocess-3 %{buildroot}/%{_bindir}/praw-multiprocess-%{python3_version} + +%if %{with tests} +%check +%{__python2} setup.py test +%{__python3} setup.py test +%endif -%files -n python2-%{srcname} -%doc CHANGES.rst README.rst +%files -n python2-%{pypi_name} +%doc README.rst %license COPYING -%{_bindir}/%{srcname}-multiprocess -%{python2_sitelib}/* +%{_bindir}/praw-multiprocess-2 +%{_bindir}/praw-multiprocess-%{python2_version} +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%files -n python3-%{srcname} -%doc CHANGES.rst README.rst +%files -n python3-%{pypi_name} +%doc README.rst %license COPYING -%{_bindir}/%{srcname}-multiprocess -%{python3_sitelib}/* +%{_bindir}/praw-multiprocess +%{_bindir}/praw-multiprocess-3 +%{_bindir}/praw-multiprocess-%{python3_version} +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%if %{with docs} +%files -n python-%{pypi_name}-doc +%doc html +%endif %changelog +* Fri Aug 26 2016 Fabio Alessandro Locati - 3.5.0-1 +- Update to 3.5.0 +- SPEC refactor + * Tue Jul 19 2016 Fedora Release Engineering - 3.4.0-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/sources b/sources index 5d725c0..c18bd8d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fba1e128feed697dc5c5893d0007331d praw-3.4.0.tar.gz +9dd894c7fd925514354c2f4d31f55d92 praw-3.5.0.zip