]>
Commit | Line | Data |
---|---|---|
27e28ee6 ER |
1 | # |
2 | # Conditional build: | |
877d2810 | 3 | %bcond_without python2 # CPython 2.x module |
3483cee9 | 4 | %bcond_with python3 # CPython 3.x module |
27e28ee6 ER |
5 | %bcond_with tests # perform "make test" (3 tests fail) |
6 | ||
7 | %define module feedparser | |
c2a94746 | 8 | Summary: Parse RSS and Atom feeds in Python |
0021bc88 | 9 | Summary(pl.UTF-8): Biblioteka Feed Parser dla Pythona |
27e28ee6 | 10 | Name: python-%{module} |
75c4dfa0 | 11 | Version: 5.2.1 |
0f2cad26 | 12 | Release: 5 |
c2a94746 | 13 | License: BSD |
b3def301 | 14 | Group: Libraries/Python |
75c4dfa0 AM |
15 | Source0: https://github.com/kurtmckee/feedparser/archive/%{version}.tar.gz |
16 | # Source0-md5: 885d800496ffd538920960b9dbc45faf | |
17 | URL: https://github.com/kurtmckee/feedparser | |
0aeb509c | 18 | BuildRequires: rpm-pythonprov |
8baab56e | 19 | BuildRequires: rpmbuild(macros) >= 1.710 |
877d2810 AM |
20 | %if %{with python2} |
21 | BuildRequires: python-devel >= 1:2.3.0 | |
22 | BuildRequires: python-distribute | |
23 | %endif | |
24 | %if %{with python3} | |
25 | BuildRequires: python3-devel | |
877d2810 AM |
26 | BuildRequires: python3-modules |
27 | %endif | |
27e28ee6 | 28 | Requires: python-modules |
cb02266c | 29 | BuildArch: noarch |
b3def301 MM |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
c2a94746 ER |
33 | Universal Feed Parser is a Python module for downloading and parsing |
34 | syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland | |
35 | RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, | |
36 | Atom 1.0, and CDF feeds. It also parses several popular extension | |
37 | modules, including Dublin Core and Apple's iTunes extensions. | |
b3def301 | 38 | |
d0ba5ba0 | 39 | %description -l pl.UTF-8 |
0aeb509c | 40 | Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie. |
b3def301 | 41 | |
877d2810 AM |
42 | %package -n python3-%{module} |
43 | Summary: Parse RSS and Atom feeds in Python | |
44 | Summary(pl.UTF-8): Biblioteka Feed Parser dla Pythona | |
45 | Group: Libraries/Python | |
46 | Requires: python3-modules | |
47 | ||
48 | %description -n python3-%{module} | |
49 | Universal Feed Parser is a Python module for downloading and parsing | |
50 | syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland | |
51 | RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, | |
52 | Atom 1.0, and CDF feeds. It also parses several popular extension | |
53 | modules, including Dublin Core and Apple's iTunes extensions. | |
54 | ||
55 | %description -n python3-%{module} -l pl.UTF-8 | |
56 | Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie. | |
57 | ||
b3def301 | 58 | %prep |
27e28ee6 | 59 | %setup -q -n %{module}-%{version} |
b3def301 MM |
60 | |
61 | %build | |
b3def301 | 62 | |
877d2810 | 63 | %if %{with python2} |
bcdb6e7f | 64 | %py_build |
877d2810 AM |
65 | %{?with_tests:cd feedparser; PYTHONPATH=../build-2 %{__python} feedparsertest.py; cd ..} |
66 | %endif | |
67 | ||
68 | %if %{with python3} | |
bcdb6e7f | 69 | %py3_build |
877d2810 | 70 | %{?with_tests:cd feedparser; PYTHONPATH=../build-3 %{__python} feedparsertest.py; cd ..} |
27e28ee6 ER |
71 | %endif |
72 | ||
b3def301 MM |
73 | %install |
74 | rm -rf $RPM_BUILD_ROOT | |
877d2810 AM |
75 | |
76 | %if %{with python2} | |
bcdb6e7f | 77 | %py_install |
c88bb164 MC |
78 | |
79 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
80 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
e3fb7fea | 81 | %py_postclean |
877d2810 AM |
82 | %endif |
83 | ||
84 | %if %{with python3} | |
bcdb6e7f | 85 | %py3_install |
877d2810 | 86 | %endif |
b3def301 MM |
87 | |
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
877d2810 | 91 | %if %{with python2} |
b3def301 MM |
92 | %files |
93 | %defattr(644,root,root,755) | |
75c4dfa0 | 94 | %doc LICENSE NEWS README.rst |
e3fb7fea JB |
95 | %{py_sitescriptdir}/feedparser.py[co] |
96 | %{py_sitescriptdir}/feedparser-*.egg-info | |
877d2810 AM |
97 | %endif |
98 | ||
99 | %if %{with python3} | |
100 | %files -n python3-%{module} | |
101 | %defattr(644,root,root,755) | |
75c4dfa0 | 102 | %doc LICENSE NEWS README.rst |
877d2810 AM |
103 | %{py3_sitescriptdir}/feedparser.py |
104 | %{py3_sitescriptdir}/__pycache__/feedparser.*.py[co] | |
105 | %{py3_sitescriptdir}/feedparser-*.egg-info | |
106 | %endif |