]> git.pld-linux.org Git - packages/python-bs4.git/blob - python-bs4.spec
c33b8684995d020ee520785f8e5ec9c96f644ab4
[packages/python-bs4.git] / python-bs4.spec
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
8 Summary:        beautifulsoup4 - Screen-scraping library
9 Name:           python-%{module}
10 Version:        4.4.1
11 Release:        1
12 License:        MIT
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
15 # Source0-md5:  8fbd9a7cac0704645fa20d1419036815
16 Patch0:         test_suite.patch
17 URL:            http://www.crummy.com/software/BeautifulSoup/bs4/
18 BuildRequires:  rpm-pythonprov
19 %if %{with python2}
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-setuptools
24 %endif
25 Requires:       python-modules
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
31 idioms for iterating, searching, and modifying the parse tree.
32
33 %package -n python3-%{module}
34 Summary:        beautifulsoup4 - Screen-scraping library
35 Group:          Libraries/Python
36 Requires:       python3-modules
37
38 %description -n python3-%{module}
39 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
40 idioms for iterating, searching, and modifying the parse tree.
41
42 %prep
43 %setup -q -n beautifulsoup4-%{version}
44 %patch0 -p1
45
46 %build
47 %if %{with python2}
48 %py_build %{?with_tests:test}
49 %endif
50
51 %if %{with python3}
52 %py3_build %{?with_tests:test}
53 %endif
54
55 %if %{with doc}
56 cd docs
57 %{__make} -j1 html
58 rm -rf _build/html/_sources
59 %endif
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %if %{with python2}
65 %py_install
66 %endif
67
68 %if %{with python3}
69 %py3_install
70 %endif
71
72 %clean
73 rm -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.387548 seconds and 3 git commands to generate.