]> git.pld-linux.org Git - packages/python-mechanicalsoup.git/blame - python-mechanicalsoup.spec
rebuild with python 3.10
[packages/python-mechanicalsoup.git] / python-mechanicalsoup.spec
CommitLineData
0b3864af
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module mechanicalsoup
7Summary: A Python library for automating interaction with websites
8Name: python-%{module}
63fa5940 9Version: 0.4.0
b9951bc6 10Release: 8
0b3864af
JK
11License: MIT
12Group: Libraries/Python
13Source0: https://pypi.python.org/packages/source/M/MechanicalSoup/MechanicalSoup-%{version}.zip
63fa5940 14# Source0-md5: f6eb7d7fc69fb6ce434b64a3a92c7e48
0b3864af 15URL: https://github.com/hickford/MechanicalSoup
1f9b9e01 16BuildRequires: rpmbuild(macros) >= 1.710
0b3864af
JK
17BuildRequires: rpm-pythonprov
18%if %{with python2}
19BuildRequires: python-setuptools
20%endif
21%if %{with python3}
22BuildRequires: python3-setuptools
23%endif
24Requires: python-bs4
25Requires: python-requests
26Requires: python-six
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31A Python library for automating interaction with websites.
32MechanicalSoup automatically stores and sends cookies, follows
33redirects, and can follow links and submit forms. It doesn't do
34Javascript.
35
36%package -n python3-%{module}
37Summary: A Python library for automating interaction with websites
38Group: Libraries/Python
39Requires: python3-bs4
40Requires: python3-requests
41Requires: python3-six
42
43%description -n python3-%{module}
44A Python library for automating interaction with websites.
45MechanicalSoup automatically stores and sends cookies, follows
46redirects, and can follow links and submit forms. It doesn't do
47Javascript.
48
49%prep
50%setup -q -n MechanicalSoup-%{version}
51
52%build
53%if %{with python2}
608a2915 54%py_build
0b3864af
JK
55%endif
56
57%if %{with python3}
608a2915 58%py3_build
0b3864af
JK
59%endif
60
61%install
62rm -rf $RPM_BUILD_ROOT
63
64%if %{with python2}
608a2915 65%py_install
0b3864af
JK
66%endif
67
68%if %{with python3}
608a2915 69%py3_install
0b3864af
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%{py_sitescriptdir}/mechanicalsoup
79%{py_sitescriptdir}/MechanicalSoup-%{version}-py*.egg-info
80%endif
81
82%if %{with python3}
83%files -n python3-%{module}
84%defattr(644,root,root,755)
85%{py3_sitescriptdir}/mechanicalsoup
86%{py3_sitescriptdir}/MechanicalSoup-%{version}-py*.egg-info
87%endif
This page took 0.123894 seconds and 4 git commands to generate.