]> git.pld-linux.org Git - packages/python-feedparser.git/blob - python-feedparser.spec
- release 5 (by relup.sh)
[packages/python-feedparser.git] / python-feedparser.spec
1 #
2 # Conditional build:
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)
6
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}
11 Version:        5.2.1
12 Release:        5
13 License:        BSD
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
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
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
39
40 %description -l pl.UTF-8
41 Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie.
42
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
48
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.
55
56 %description -n python3-%{module} -l pl.UTF-8
57 Ten pakiet umożliwia analizę źródeł RSS i Atom w Pythonie.
58
59 %prep
60 %setup -q -n %{module}-%{version}
61
62 %build
63
64 %if %{with python2}
65 %py_build
66 %{?with_tests:cd feedparser; PYTHONPATH=../build-2 %{__python} feedparsertest.py; cd ..}
67 %endif
68
69 %if %{with python3}
70 %py3_build
71 %{?with_tests:cd feedparser; PYTHONPATH=../build-3 %{__python} feedparsertest.py; cd ..}
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %if %{with python2}
78 %py_install
79
80 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
81 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %files
94 %defattr(644,root,root,755)
95 %doc LICENSE NEWS README.rst
96 %{py_sitescriptdir}/feedparser.py[co]
97 %{py_sitescriptdir}/feedparser-*.egg-info
98 %endif
99
100 %if %{with python3}
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
107 %endif
This page took 0.061928 seconds and 3 git commands to generate.