3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with tests # perform "make test" (3 tests fail)
7 %define module feedparser
8 Summary: Parse RSS and Atom feeds in Python
9 Summary(pl.UTF-8): Biblioteka Feed Parser dla Pythona
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://github.com/kurtmckee/feedparser/archive/%{version}.tar.gz
16 # Source0-md5: 885d800496ffd538920960b9dbc45faf
17 URL: https://github.com/kurtmckee/feedparser
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.710
21 BuildRequires: python-devel >= 1:2.3.0
22 BuildRequires: python-distribute
25 BuildRequires: python3-devel
26 BuildRequires: python3-distribute
27 BuildRequires: python3-modules
29 Requires: python-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Universal Feed Parser is a Python module for downloading and parsing
35 syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland
36 RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3,
37 Atom 1.0, and CDF feeds. It also parses several popular extension
38 modules, including Dublin Core and Apple's iTunes extensions.
40 %description -l pl.UTF-8
41 Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie.
43 %package -n python3-%{module}
44 Summary: Parse RSS and Atom feeds in Python
45 Summary(pl.UTF-8): Biblioteka Feed Parser dla Pythona
46 Group: Libraries/Python
47 Requires: python3-modules
49 %description -n python3-%{module}
50 Universal Feed Parser is a Python module for downloading and parsing
51 syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland
52 RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3,
53 Atom 1.0, and CDF feeds. It also parses several popular extension
54 modules, including Dublin Core and Apple's iTunes extensions.
56 %description -n python3-%{module} -l pl.UTF-8
57 Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie.
60 %setup -q -n %{module}-%{version}
66 %{?with_tests:cd feedparser; PYTHONPATH=../build-2 %{__python} feedparsertest.py; cd ..}
71 %{?with_tests:cd feedparser; PYTHONPATH=../build-3 %{__python} feedparsertest.py; cd ..}
75 rm -rf $RPM_BUILD_ROOT
80 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
81 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
90 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 %doc LICENSE NEWS README.rst
96 %{py_sitescriptdir}/feedparser.py[co]
97 %{py_sitescriptdir}/feedparser-*.egg-info
101 %files -n python3-%{module}
102 %defattr(644,root,root,755)
103 %doc LICENSE NEWS README.rst
104 %{py3_sitescriptdir}/feedparser.py
105 %{py3_sitescriptdir}/__pycache__/feedparser.*.py[co]
106 %{py3_sitescriptdir}/feedparser-*.egg-info