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