]> git.pld-linux.org Git - packages/python-bs4.git/blame - python-bs4.spec
- updated to 4.9.3
[packages/python-bs4.git] / python-bs4.spec
CommitLineData
39babf68
JK
1#
2# Conditional build:
6edb640d
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
39babf68
JK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module bs4
9Summary: beautifulsoup4 - Screen-scraping library
6edb640d 10Summary(pl.UTF-8): beautifulsoup4 - biblioteka przechwytująca wyjście
39babf68 11Name: python-%{module}
2a80d360
JB
12# keep 4.9.x here for python2 support
13Version: 4.9.3
14Release: 1
39babf68
JK
15License: MIT
16Group: Libraries/Python
6edb640d
JB
17#Source0Download: https://pypi.org/simple/beautifulsoup4/
18Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
2a80d360 19# Source0-md5: 57fd468ae3eb055f6871106e8f7813e2
f3d1c76a 20Patch0: test_suite.patch
a307bef6 21Patch2: %{name}-smart_quotes.patch
6edb640d
JB
22URL: https://www.crummy.com/software/BeautifulSoup/
23BuildRequires: rpmbuild(macros) >= 1.714
39babf68
JK
24BuildRequires: rpm-pythonprov
25%if %{with python2}
6edb640d 26BuildRequires: python-modules >= 1:2.7
39babf68 27BuildRequires: python-setuptools
2a80d360 28BuildRequires: python-soupsieve >= 1.2
39babf68
JK
29%endif
30%if %{with python3}
2a80d360 31BuildRequires: python3-2to3 >= 1:3.2
6edb640d 32BuildRequires: python3-modules >= 1:3.2
39babf68 33BuildRequires: python3-setuptools
2a80d360 34BuildRequires: python3-soupsieve >= 1.2
39babf68 35%endif
6edb640d 36%if %{with doc}
2a80d360 37BuildRequires: sphinx-pdg-2
6edb640d
JB
38%endif
39Requires: python-modules >= 1:2.7
39babf68
JK
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
45idioms for iterating, searching, and modifying the parse tree.
46
6edb640d
JB
47%description -l pl.UTF-8
48Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
49pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
50analizy.
51
39babf68
JK
52%package -n python3-%{module}
53Summary: beautifulsoup4 - Screen-scraping library
6edb640d 54Summary(pl.UTF-8): beautifulsoup4 - biblioteka przechwytująca wyjście
39babf68 55Group: Libraries/Python
6edb640d 56Requires: python3-modules >= 1:3.2
39babf68
JK
57
58%description -n python3-%{module}
59Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
60idioms for iterating, searching, and modifying the parse tree.
61
6edb640d
JB
62%description -n python3-%{module} -l pl.UTF-8
63Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
64pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
65analizy.
66
67%package apidocs
68Summary: API documentation for Python beautifulsoup4 module
69Summary(pl.UTF-8): Dokumentacja API modułu Pythona beautifulsoup4
70Group: Documentation
71
72%description apidocs
73API documentation for Python beautifulsoup4 module.
74
75%description apidocs -l pl.UTF-8
76Dokumentacja API modułu Pythona beautifulsoup4.
77
39babf68
JK
78%prep
79%setup -q -n beautifulsoup4-%{version}
f3d1c76a 80%patch0 -p1
a307bef6 81%patch2 -p1
39babf68 82
2a80d360
JB
83# no longer supported by setuptools
84%{__sed} -i -e '/use_2to3/d' setup.py
85
39babf68
JK
86%build
87%if %{with python2}
2a80d360
JB
88%py_build
89
90%if %{with tests}
91%{__python} -m unittest discover -s bs4
92%endif
39babf68
JK
93%endif
94
95%if %{with python3}
2a80d360
JB
96%py3_build
97
982to3-%{py3_ver} --no-diffs -n -w build-3/lib
99
100%if %{with tests}
101cd build-3/lib
102%{__python3} -m unittest discover -s bs4
103cd ../..
104%endif
39babf68
JK
105%endif
106
107%if %{with doc}
2a80d360
JB
108%{__make} -C doc html \
109 SPHINXBUILD=sphinx-build-2
39babf68
JK
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
f3d1c76a 116%py_install
2a80d360
JB
117
118%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/bs4/tests
119%py_postclean
39babf68
JK
120%endif
121
122%if %{with python3}
f3d1c76a 123%py3_install
2a80d360
JB
124
125%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/bs4/tests
39babf68
JK
126%endif
127
128%clean
129rm -rf $RPM_BUILD_ROOT
130
131%if %{with python2}
132%files
133%defattr(644,root,root,755)
2a80d360 134%doc COPYING.txt NEWS.txt README.md TODO.txt
39babf68
JK
135%{py_sitescriptdir}/bs4
136%{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
137%endif
138
139%if %{with python3}
140%files -n python3-%{module}
141%defattr(644,root,root,755)
2a80d360 142%doc COPYING.txt NEWS.txt README.md TODO.txt
39babf68
JK
143%{py3_sitescriptdir}/bs4
144%{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
145%endif
6edb640d
JB
146
147%if %{with doc}
148%files apidocs
149%defattr(644,root,root,755)
150%doc doc/build/html/{_images,_static,*.html,*.js}
151%endif
This page took 0.133315 seconds and 4 git commands to generate.