]> git.pld-linux.org Git - packages/python-bs4.git/blob - python-bs4.spec
- python 3.6
[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:        3
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:  rpmbuild(macros) >= 1.710
19 BuildRequires:  rpm-pythonprov
20 %if %{with python2}
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-setuptools
25 %endif
26 Requires:       python-modules
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
32 idioms for iterating, searching, and modifying the parse tree.
33
34 %package -n python3-%{module}
35 Summary:        beautifulsoup4 - Screen-scraping library
36 Group:          Libraries/Python
37 Requires:       python3-modules
38
39 %description -n python3-%{module}
40 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
41 idioms for iterating, searching, and modifying the parse tree.
42
43 %prep
44 %setup -q -n beautifulsoup4-%{version}
45 %patch0 -p1
46
47 %build
48 %if %{with python2}
49 %py_build %{?with_tests:test}
50 %endif
51
52 %if %{with python3}
53 %py3_build %{?with_tests:test}
54 %endif
55
56 %if %{with doc}
57 cd docs
58 %{__make} -j1 html
59 rm -rf _build/html/_sources
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %if %{with python2}
66 %py_install
67 %endif
68
69 %if %{with python3}
70 %py3_install
71 %endif
72
73 %clean
74 rm -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.074133 seconds and 4 git commands to generate.