]> git.pld-linux.org Git - packages/python-bs4.git/blame - python-bs4.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-bs4.git] / python-bs4.spec
CommitLineData
39babf68
JK
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module bs4
8Summary: beautifulsoup4 - Screen-scraping library
9Name: python-%{module}
10Version: 4.4.1
a0a073db 11Release: 2
39babf68
JK
12License: MIT
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
15# Source0-md5: 8fbd9a7cac0704645fa20d1419036815
f3d1c76a 16Patch0: test_suite.patch
39babf68 17URL: http://www.crummy.com/software/BeautifulSoup/bs4/
6f2c820c 18BuildRequires: rpmbuild(macros) >= 1.710
39babf68
JK
19BuildRequires: rpm-pythonprov
20%if %{with python2}
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-setuptools
25%endif
26Requires: python-modules
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
32idioms for iterating, searching, and modifying the parse tree.
33
34%package -n python3-%{module}
35Summary: beautifulsoup4 - Screen-scraping library
36Group: Libraries/Python
37Requires: python3-modules
38
39%description -n python3-%{module}
40Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
41idioms for iterating, searching, and modifying the parse tree.
42
43%prep
44%setup -q -n beautifulsoup4-%{version}
f3d1c76a 45%patch0 -p1
39babf68
JK
46
47%build
48%if %{with python2}
f3d1c76a 49%py_build %{?with_tests:test}
39babf68
JK
50%endif
51
52%if %{with python3}
f3d1c76a 53%py3_build %{?with_tests:test}
39babf68
JK
54%endif
55
56%if %{with doc}
57cd docs
58%{__make} -j1 html
59rm -rf _build/html/_sources
60%endif
61
62%install
63rm -rf $RPM_BUILD_ROOT
64
65%if %{with python2}
f3d1c76a 66%py_install
39babf68
JK
67%endif
68
69%if %{with python3}
f3d1c76a 70%py3_install
39babf68
JK
71%endif
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%if %{with python2}
77%files
78%defattr(644,root,root,755)
79%doc {AUTHORS,NEWS,README,TODO}.txt
80%{py_sitescriptdir}/bs4
81%{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
82%endif
83
84%if %{with python3}
85%files -n python3-%{module}
86%defattr(644,root,root,755)
87%doc {AUTHORS,NEWS,README,TODO}.txt
88%{py3_sitescriptdir}/bs4
89%{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
90%endif
This page took 0.099319 seconds and 4 git commands to generate.