Repository navigation
Expand file tree
/
Copy pathpython3-bs4.spec
More file actions
93 lines (78 loc) · 2.4 KB
/
Copy pathpython3-bs4.spec
File metadata and controls
93 lines (78 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests
%define module bs4
Summary: beautifulsoup4 - Screen-scraping library
Summary(pl.UTF-8): beautifulsoup4 - biblioteka przechwytująca wyjście
Name: python3-%{module}
Version: 4.15.0
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/beautifulsoup4/
Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
# Source0-md5: a9d04db2259b78ec23fcdfddfed5bcb8
URL: https://www.crummy.com/software/BeautifulSoup/
BuildRequires: python3-build
BuildRequires: python3-hatchling
BuildRequires: python3-installer
BuildRequires: python3-modules >= 1:3.7.0
%if %{with tests}
BuildRequires: python3-html5lib
BuildRequires: python3-lxml
BuildRequires: python3-packaging
BuildRequires: python3-pytest >= 6
BuildRequires: python3-soupsieve >= 2.6
BuildRequires: python3-typing_extensions >= 4.0.0
%endif
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: rpm-pythonprov
%if %{with doc}
BuildRequires: sphinx-pdg-3
%endif
Requires: python3-modules >= 1:3.7.0
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
idioms for iterating, searching, and modifying the parse tree.
%description -l pl.UTF-8
Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
analizy.
%package apidocs
Summary: API documentation for Python beautifulsoup4 module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona beautifulsoup4
Group: Documentation
%description apidocs
API documentation for Python beautifulsoup4 module.
%description apidocs -l pl.UTF-8
Dokumentacja API modułu Pythona beautifulsoup4.
%prep
%setup -q -n beautifulsoup4-%{version}
%build
%py3_build_pyproject
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
%{__python3} -m pytest bs4/tests
%endif
%if %{with doc}
%{__make} -C doc html \
SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS CHANGELOG LICENSE README.md
%{py3_sitescriptdir}/bs4
%{py3_sitescriptdir}/beautifulsoup4-%{version}.dist-info
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
%doc doc/_build/html/{_images,_static,*.html,*.js}
%endif