]> git.pld-linux.org Git - packages/python-mechanicalsoup.git/blob - python-mechanicalsoup.spec
7686ad3030df9e0493c9c635f7fb1256de5afce0
[packages/python-mechanicalsoup.git] / python-mechanicalsoup.spec
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
7 Summary:        A Python library for automating interaction with websites
8 Name:           python-%{module}
9 Version:        0.4.0
10 Release:        4
11 License:        MIT
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/M/MechanicalSoup/MechanicalSoup-%{version}.zip
14 # Source0-md5:  f6eb7d7fc69fb6ce434b64a3a92c7e48
15 URL:            https://github.com/hickford/MechanicalSoup
16 BuildRequires:  rpmbuild(macros) >= 1.710
17 BuildRequires:  rpm-pythonprov
18 %if %{with python2}
19 BuildRequires:  python-setuptools
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-setuptools
23 %endif
24 Requires:       python-bs4
25 Requires:       python-requests
26 Requires:       python-six
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 A Python library for automating interaction with websites.
32 MechanicalSoup automatically stores and sends cookies, follows
33 redirects, and can follow links and submit forms. It doesn't do
34 Javascript.
35
36 %package -n python3-%{module}
37 Summary:        A Python library for automating interaction with websites
38 Group:          Libraries/Python
39 Requires:       python3-bs4
40 Requires:       python3-requests
41 Requires:       python3-six
42
43 %description -n python3-%{module}
44 A Python library for automating interaction with websites.
45 MechanicalSoup automatically stores and sends cookies, follows
46 redirects, and can follow links and submit forms. It doesn't do
47 Javascript.
48
49 %prep
50 %setup -q -n MechanicalSoup-%{version}
51
52 %build
53 %if %{with python2}
54 %py_build
55 %endif
56
57 %if %{with python3}
58 %py3_build
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 %{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.106662 seconds and 2 git commands to generate.