]> git.pld-linux.org Git - packages/python-bs4.git/blob - python-bs4.spec
- pl, added apidocs
[packages/python-bs4.git] / python-bs4.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  bs4
9 Summary:        beautifulsoup4 - Screen-scraping library
10 Summary(pl.UTF-8):      beautifulsoup4 - biblioteka przechwytująca wyjście
11 Name:           python-%{module}
12 Version:        4.6.0
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/beautifulsoup4/
17 Source0:        https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
18 # Source0-md5:  c17714d0f91a23b708a592cb3c697728
19 Patch0:         test_suite.patch
20 URL:            https://www.crummy.com/software/BeautifulSoup/
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 BuildRequires:  rpm-pythonprov
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.2
29 BuildRequires:  python3-setuptools
30 %endif
31 %if %{with doc}
32 BuildRequires:  sphinx-pdg
33 %endif
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
40 idioms for iterating, searching, and modifying the parse tree.
41
42 %description -l pl.UTF-8
43 Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
44 pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
45 analizy.
46
47 %package -n python3-%{module}
48 Summary:        beautifulsoup4 - Screen-scraping library
49 Summary(pl.UTF-8):      beautifulsoup4 - biblioteka przechwytująca wyjście
50 Group:          Libraries/Python
51 Requires:       python3-modules >= 1:3.2
52
53 %description -n python3-%{module}
54 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
55 idioms for iterating, searching, and modifying the parse tree.
56
57 %description -n python3-%{module} -l pl.UTF-8
58 Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
59 pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
60 analizy.
61
62 %package apidocs
63 Summary:        API documentation for Python beautifulsoup4 module
64 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona beautifulsoup4
65 Group:          Documentation
66
67 %description apidocs
68 API documentation for Python beautifulsoup4 module.
69
70 %description apidocs -l pl.UTF-8
71 Dokumentacja API modułu Pythona beautifulsoup4.
72
73 %prep
74 %setup -q -n beautifulsoup4-%{version}
75 %patch0 -p1
76
77 %build
78 %if %{with python2}
79 %py_build %{?with_tests:test}
80 %endif
81
82 %if %{with python3}
83 %py3_build %{?with_tests:test}
84 %endif
85
86 %if %{with doc}
87 %{__make} -C doc html
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %py_install
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc {AUTHORS,COPYING,NEWS,README,TODO}.txt
108 %{py_sitescriptdir}/bs4
109 %{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
110 %endif
111
112 %if %{with python3}
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc {AUTHORS,COPYING,NEWS,README,TODO}.txt
116 %{py3_sitescriptdir}/bs4
117 %{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
118 %endif
119
120 %if %{with doc}
121 %files apidocs
122 %defattr(644,root,root,755)
123 %doc doc/build/html/{_images,_static,*.html,*.js}
124 %endif
This page took 0.092001 seconds and 3 git commands to generate.