|
|
9af66d9 |
%if 0%{?fedora} > 12
|
|
|
4d5a16e |
%global with_python3 1
|
|
Haikel Guemar |
5c9f848 |
%endif
|
|
Haikel Guemar |
5c9f848 |
|
|
Haikel Guemar |
5c9f848 |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
Haikel Guemar |
5c9f848 |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
Haikel Guemar |
5c9f848 |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
4d5a16e |
%endif
|
|
|
4d5a16e |
|
|
|
72f5de6 |
# -doc package generation
|
|
|
72f5de6 |
# EL6: python-sphinx is not new enough
|
|
|
72f5de6 |
%if 0%{?fedora} > 16
|
|
|
72f5de6 |
%global with_docpkg 1
|
|
|
72f5de6 |
%endif
|
|
|
72f5de6 |
|
|
|
4d5a16e |
%global srcname feedparser
|
|
Haikel Guemar |
5c9f848 |
%global tag .post1
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
Name: python-feedparser
|
|
Haikel Guemar |
5c9f848 |
Version: 5.2.0
|
|
|
945c3c4 |
Release: 4%{?dist}
|
|
|
e3cdc83 |
Summary: Parse RSS and Atom feeds in Python
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
Group: Development/Languages
|
|
|
e1f1058 |
License: BSD
|
|
Haikel Guemar |
5c9f848 |
URL: https://github.com/kurtmckee/feedparser
|
|
Haikel Guemar |
5c9f848 |
Source0: https://pypi.python.org/packages/source/f/%{srcname}/%{srcname}-%{version}%{tag}.tar.bz2
|
|
|
747a33b |
# only for EPEL5
|
|
|
e3cdc83 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
BuildArch: noarch
|
|
Haikel Guemar |
5c9f848 |
BuildRequires: python2-devel
|
|
|
4d5a16e |
BuildRequires: python-setuptools
|
|
|
e3cdc83 |
|
|
|
feab52c |
# optional import at run-time, but is likely installed because other
|
|
|
feab52c |
# python module packages depend on it, too
|
|
|
feab52c |
# no failing tests on 2013-03-09 with python-chardet-2.0.1
|
|
|
feab52c |
BuildRequires: python-chardet
|
|
|
feab52c |
Requires: python-chardet
|
|
|
feab52c |
|
|
|
f860bda |
## TODO: Decide on these, also with regard to explicit "Requires".
|
|
|
747a33b |
## Optional imports at run-time and influence the test-suite, too,
|
|
|
747a33b |
## and causes additional tests to fail.
|
|
|
9b3cec8 |
#
|
|
|
f860bda |
#BuildRequires: python-BeautifulSoup
|
|
|
9b3cec8 |
# usage removed in > 5.1.3
|
|
|
9b3cec8 |
#
|
|
|
f860bda |
## the preferred XML parser
|
|
|
f860bda |
#BuildRequires: libxml2-python
|
|
|
f860bda |
|
|
|
feab52c |
## TODO: python3-chardet BR and Req
|
|
|
9b3cec8 |
# fixes included in > 5.1.3
|
|
|
feab52c |
|
|
|
747a33b |
# shows that for Python 3 the test-suite fails early with
|
|
|
747a33b |
# ImportError: No module named 'BaseHTTPServer'
|
|
|
747a33b |
Patch0: feedparser-5.1.3-tests-py3.patch
|
|
|
747a33b |
|
|
|
f860bda |
|
|
|
e3cdc83 |
%description
|
|
|
e3cdc83 |
Universal Feed Parser is a Python module for downloading and parsing
|
|
|
e3cdc83 |
syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91,
|
|
|
e3cdc83 |
Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
|
|
|
e3cdc83 |
Atom 0.3, Atom 1.0, and CDF feeds. It also parses several popular extension
|
|
|
e3cdc83 |
modules, including Dublin Core and Apple's iTunes extensions.
|
|
|
e3cdc83 |
|
|
|
4d5a16e |
%if 0%{?with_python3}
|
|
|
4d5a16e |
%package -n python3-%{srcname}
|
|
|
4d5a16e |
Summary: Parse RSS and Atom feeds in Python
|
|
|
4d5a16e |
BuildRequires: python3-devel
|
|
|
4d5a16e |
BuildRequires: python3-setuptools
|
|
|
4d5a16e |
%description -n python3-%{srcname}
|
|
|
4d5a16e |
Universal Feed Parser is a Python module for downloading and parsing
|
|
|
4d5a16e |
syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91,
|
|
|
4d5a16e |
Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
|
|
|
4d5a16e |
Atom 0.3, Atom 1.0, and CDF feeds. It also parses several popular extension
|
|
|
4d5a16e |
modules, including Dublin Core and Apple's iTunes extensions.
|
|
|
4d5a16e |
%endif
|
|
|
4d5a16e |
|
|
|
72f5de6 |
%if 0%{?with_docpkg}
|
|
|
47f107a |
%package doc
|
|
|
47f107a |
BuildRequires: python-sphinx
|
|
|
47f107a |
BuildArch: noarch
|
|
|
47f107a |
Summary: Documentation for the Python feedparser
|
|
|
47f107a |
|
|
|
47f107a |
%description doc
|
|
|
47f107a |
This documentation describes the behavior of Universal Feed Parser %{version}.
|
|
|
47f107a |
|
|
|
47f107a |
The documentation is also included in source form (Sphinx ReST).
|
|
|
72f5de6 |
%endif
|
|
|
47f107a |
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
%prep
|
|
|
4d5a16e |
%setup -q -n %{srcname}-%{version}
|
|
|
4d5a16e |
%if 0%{?with_python3}
|
|
|
4d5a16e |
cp -a . %{py3dir}
|
|
|
747a33b |
pushd %{py3dir}
|
|
|
747a33b |
%patch0 -p1
|
|
|
747a33b |
popd
|
|
|
4d5a16e |
%endif
|
|
|
e3cdc83 |
|
|
|
747a33b |
find -type f -exec sed -i 's/\r//' {} ';'
|
|
|
747a33b |
find -type f -exec chmod 0644 {} ';'
|
|
|
747a33b |
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
%build
|
|
Haikel Guemar |
5c9f848 |
%{__python2} setup.py build
|
|
|
47f107a |
|
|
|
72f5de6 |
%if 0%{?with_docpkg}
|
|
|
47f107a |
# build documentation
|
|
|
47f107a |
rm -rf __tmp_docs ; mkdir __tmp_docs
|
|
|
47f107a |
sphinx-build -b html -d __tmp_docs/ docs/ __tmp_docs/html/
|
|
|
72f5de6 |
%endif
|
|
|
47f107a |
|
|
|
4d5a16e |
%if 0%{?with_python3}
|
|
|
4d5a16e |
pushd %{py3dir}
|
|
|
3b2023c |
%{__python3} setup.py build
|
|
|
4d5a16e |
popd
|
|
|
4d5a16e |
%endif
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
%install
|
|
|
747a33b |
# only for EPEL5
|
|
|
4d5a16e |
rm -rf %{buildroot}
|
|
|
747a33b |
|
|
Haikel Guemar |
5c9f848 |
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
4d5a16e |
%if 0%{?with_python3}
|
|
|
4d5a16e |
pushd %{py3dir}
|
|
|
4d5a16e |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
|
4d5a16e |
popd
|
|
|
4d5a16e |
%endif
|
|
|
4d5a16e |
|
|
|
4d5a16e |
|
|
|
864858f |
%check
|
|
|
864858f |
pushd feedparser
|
|
Haikel Guemar |
5c9f848 |
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} feedparsertest.py || :
|
|
|
864858f |
popd
|
|
|
864858f |
%if 0%{?with_python3}
|
|
|
864858f |
pushd %{py3dir}/feedparser
|
|
|
747a33b |
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} feedparsertest.py || :
|
|
|
864858f |
popd
|
|
|
864858f |
%endif
|
|
|
e5a9f8c |
|
|
|
3b2023c |
|
|
|
747a33b |
# only for EPEL5
|
|
|
e3cdc83 |
%clean
|
|
|
4d5a16e |
rm -rf %{buildroot}
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
%files
|
|
|
e3cdc83 |
%defattr(-,root,root,-)
|
|
Haikel Guemar |
5c9f848 |
%doc LICENSE README.rst NEWS
|
|
Haikel Guemar |
5c9f848 |
%{python2_sitelib}/*
|
|
|
e3cdc83 |
|
|
|
4d5a16e |
%if 0%{?with_python3}
|
|
|
4d5a16e |
%files -n python3-%{srcname}
|
|
Haikel Guemar |
5c9f848 |
%doc LICENSE README.rst NEWS
|
|
|
4d5a16e |
%{python3_sitelib}/*
|
|
|
4d5a16e |
%endif
|
|
|
e3cdc83 |
|
|
|
72f5de6 |
%if 0%{?with_docpkg}
|
|
|
47f107a |
%files doc
|
|
|
47f107a |
%doc LICENSE __tmp_docs/html/
|
|
|
47f107a |
# the original Sphinx ReST tree
|
|
|
47f107a |
%doc docs
|
|
|
72f5de6 |
%endif
|
|
|
747a33b |
|
|
|
e3cdc83 |
%changelog
|
|
|
945c3c4 |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.0-4
|
|
|
945c3c4 |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
945c3c4 |
|
|
|
6bc4725 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
|
|
|
6bc4725 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
6bc4725 |
|
|
|
840fe66 |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.0-2
|
|
|
840fe66 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
840fe66 |
|
|
Haikel Guemar |
5c9f848 |
* Mon Jun 29 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 5.2.0-1
|
|
Haikel Guemar |
5c9f848 |
- Upstream 5.2.0
|
|
Haikel Guemar |
5c9f848 |
- Cleanup spec
|
|
Haikel Guemar |
5c9f848 |
|
|
|
a005989 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.3-8
|
|
|
a005989 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
a005989 |
|
|
|
0a8b979 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.3-7
|
|
|
0a8b979 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
0a8b979 |
|
|
|
4f72a50 |
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 5.1.3-6
|
|
|
4f72a50 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
4f72a50 |
|
|
|
72dfec3 |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.3-5
|
|
|
72dfec3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
72dfec3 |
|
|
|
72f5de6 |
* Mon Jun 10 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.3-4
|
|
|
72f5de6 |
- Conditionalize the -doc package, because python-sphinx is not new
|
|
|
72f5de6 |
enough for EL6.
|
|
|
72f5de6 |
|
|
|
47f107a |
* Sun May 26 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.3-3
|
|
|
47f107a |
- BR python-sphinx and build pregenerated HTML documentation to be
|
|
|
47f107a |
included in a python-feedparser-doc package together with the sources
|
|
|
47f107a |
for the documentation
|
|
|
47f107a |
|
|
|
feab52c |
* Sat Mar 9 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.3-2
|
|
|
feab52c |
- Add BuildRequires/Requires python-chardet because if it's installed
|
|
|
feab52c |
as a dependency of other Python module packages, it would be imported
|
|
|
feab52c |
and used anyway, and it doesn't make any tests fail.
|
|
|
feab52c |
|
|
|
747a33b |
* Sat Mar 9 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.3-1
|
|
|
747a33b |
- Update to 5.1.3 (50k diff).
|
|
|
747a33b |
- Patch test-suite minimally for python3 to show that it fails early.
|
|
|
747a33b |
- Fix file permissions and line delimiters at end of %%prep section.
|
|
|
747a33b |
- Fix python3 sitelib path in %%check section.
|
|
|
747a33b |
|
|
|
a77879b |
* Fri Mar 8 2013 Michael Schwendt <mschwendt@fedoraproject.org>
|
|
|
a77879b |
- Update URL to new location at Google code (#880138).
|
|
|
a77879b |
|
|
|
0180d26 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-6
|
|
|
0180d26 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
0180d26 |
|
|
|
9af66d9 |
* Tue Jan 22 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 5.1.2-5
|
|
|
9af66d9 |
- remove rhel logic from with_python3 conditional (RHBZ #902896)
|
|
|
9af66d9 |
|
|
|
a6b8ca2 |
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 5.1.2-4
|
|
|
a6b8ca2 |
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
|
|
|
a6b8ca2 |
|
|
|
0b7c220 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-3
|
|
|
0b7c220 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
0b7c220 |
|
|
|
738184a |
* Wed May 23 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.2-2
|
|
|
738184a |
- Also package NEWS files as documentation.
|
|
|
738184a |
- 5.1.2 fixes CVE-2012-2921
|
|
|
738184a |
(DoS via memory consumption processing ENTITY declarations).
|
|
|
738184a |
|
|
|
3b2023c |
* Tue May 22 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 5.1.2-1
|
|
|
3b2023c |
- Update to 5.1.2 and its security fix (#787401).
|
|
|
3b2023c |
- Ignore testsuite results for now (#787401).
|
|
|
3b2023c |
- Set PYTHONPATH in %%check section to include files in %%buildroot.
|
|
|
3b2023c |
- Drop CFLAGS usage from spec file, because this is Python.
|
|
|
3b2023c |
|
|
|
4d5a16e |
* Sat Feb 4 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 5.1-1
|
|
|
4d5a16e |
- upstream 5.1 (#787401)
|
|
|
4d5a16e |
- spec cleanup
|
|
|
4d5a16e |
- tests disabled
|
|
|
4d5a16e |
- python3 support
|
|
|
4d5a16e |
|
|
|
b7ecdd4 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.1-2
|
|
|
b7ecdd4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
b7ecdd4 |
|
|
Luke Macken |
2df9a44 |
* Tue Apr 05 2011 Luke Macken <lmacken@redhat.com> - 5.0.1-1
|
|
Luke Macken |
2df9a44 |
- Latest upstream release
|
|
Luke Macken |
2df9a44 |
- Remove feedparser_utf8_decoding.patch
|
|
Luke Macken |
2df9a44 |
- Remove democracynow_feedparser_fix.patch
|
|
Luke Macken |
2df9a44 |
- Run the test suite
|
|
Luke Macken |
2df9a44 |
|
|
|
5087462 |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-13
|
|
|
5087462 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
5087462 |
|
|
|
94dd109 |
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 4.1-12
|
|
|
94dd109 |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
94dd109 |
|
|
|
9b8ad1e |
* Mon Dec 14 2009 Haïkel Guémar <karlthered@gmail.com> - 4.1-11
|
|
|
9b8ad1e |
- rebuild for Fedora 13
|
|
|
9b8ad1e |
|
|
|
f0b2fdb |
* Fri Aug 07 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-10
|
|
|
f0b2fdb |
- Apply patch for title munging issue (#491373)
|
|
|
f0b2fdb |
|
|
|
5ea373f |
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-9
|
|
|
5ea373f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
5ea373f |
|
|
|
2a1b660 |
* Wed Mar 04 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-8
|
|
|
2a1b660 |
- Fix source URL (moved to googlecode).
|
|
|
2a1b660 |
|
|
|
5b16125 |
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-7
|
|
|
5b16125 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
5b16125 |
|
|
|
5bfb3e0 |
* Sat Dec 27 2008 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-6
|
|
|
b6c9d08 |
- Patch for a utf8 decoding issue (#477024)
|
|
|
d7eecaa |
|
|
|
5bfb3e0 |
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 4.1-5
|
|
|
5bfb3e0 |
- Rebuild for Python 2.6
|
|
|
5bfb3e0 |
|
|
|
e1f1058 |
* Wed Sep 3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 4.1-4
|
|
|
e1f1058 |
- fix license tag
|
|
|
e1f1058 |
|
|
|
e5a9f8c |
* Thu Jun 28 2007 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-3
|
|
|
e5a9f8c |
- Ghostbusting (#205413).
|
|
|
e5a9f8c |
- Remove manual python-abi Requires.
|
|
|
e5a9f8c |
- Appease rpmlint.
|
|
|
e5a9f8c |
|
|
|
625ec6d |
* Sat Dec 23 2006 Jason L Tibbitts III <tibbs@math.uh.edu> - 4.1-2
|
|
|
625ec6d |
- Rebuild for new Python.
|
|
|
625ec6d |
|
|
|
432139e |
* Wed Jan 11 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.1-1
|
|
|
432139e |
- Version 4.1
|
|
|
432139e |
|
|
|
e3cdc83 |
* Sat Jan 07 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.0.2-2
|
|
|
e3cdc83 |
- Set sane permissions on doc files.
|
|
|
e3cdc83 |
|
|
|
e3cdc83 |
* Wed Jan 04 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 4.0.2-1
|
|
|
e3cdc83 |
- Initial build.
|