]> git.pld-linux.org Git - packages/python-bs4.git/blame - python-bs4.spec
Use py_build/py_install, fix tests
[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
11Release: 1
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
JK
17URL: http://www.crummy.com/software/BeautifulSoup/bs4/
18BuildRequires: rpm-pythonprov
19%if %{with python2}
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-setuptools
24%endif
25Requires: python-modules
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
31idioms for iterating, searching, and modifying the parse tree.
32
33%package -n python3-%{module}
34Summary: beautifulsoup4 - Screen-scraping library
35Group: Libraries/Python
36Requires: python3-modules
37
38%description -n python3-%{module}
39Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
40idioms for iterating, searching, and modifying the parse tree.
41
42%prep
43%setup -q -n beautifulsoup4-%{version}
f3d1c76a 44%patch0 -p1
39babf68
JK
45
46%build
47%if %{with python2}
f3d1c76a 48%py_build %{?with_tests:test}
39babf68
JK
49%endif
50
51%if %{with python3}
f3d1c76a 52%py3_build %{?with_tests:test}
39babf68
JK
53%endif
54
55%if %{with doc}
56cd docs
57%{__make} -j1 html
58rm -rf _build/html/_sources
59%endif
60
61%install
62rm -rf $RPM_BUILD_ROOT
63
64%if %{with python2}
f3d1c76a 65%py_install
39babf68
JK
66%endif
67
68%if %{with python3}
f3d1c76a 69%py3_install
39babf68
JK
70%endif
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%if %{with python2}
76%files
77%defattr(644,root,root,755)
78%doc {AUTHORS,NEWS,README,TODO}.txt
79%{py_sitescriptdir}/bs4
80%{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
81%endif
82
83%if %{with python3}
84%files -n python3-%{module}
85%defattr(644,root,root,755)
86%doc {AUTHORS,NEWS,README,TODO}.txt
87%{py3_sitescriptdir}/bs4
88%{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
89%endif
This page took 0.172376 seconds and 4 git commands to generate.