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