]> git.pld-linux.org Git - packages/python-selenium.git/blob - python-selenium.spec
a076421b58936f4538c02c82a1626f260465d8b0
[packages/python-selenium.git] / python-selenium.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  selenium
7 Summary:        Python bindings for Selenium
8 Summary(pl.UTF-8):      Wiązania Pythona do Selenium
9 Name:           python-%{module}
10 Version:        3.141.0
11 Release:        6
12 License:        Apache v2.0
13 Group:          Development/Languages/Python
14 #Source0Download: https://pypi.org/simple/selenium/
15 Source0:        https://files.pythonhosted.org/packages/source/s/selenium/%{module}-%{version}.tar.gz
16 # Source0-md5:  274693e383ff507df7ee190359828c84
17 Patch0:         xpi-path.patch
18 Patch1:         0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
19 URL:            https://pypi.org/project/selenium/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.4
26 BuildRequires:  python3-setuptools
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 BuildRequires:  unzip
31 Suggests:       chromedriver
32 Suggests:       selenium-firefoxdriver
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Python language bindings for Selenium WebDriver.
38
39 The selenium package is used to automate web browser interaction from
40 Python.
41
42 %description -l pl.UTF-8
43 Wiązania Pythona do sterownika Selenium WebDriver.
44
45 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
46 poziomu Pythona.
47
48 %package -n python3-%{module}
49 Summary:        Python bindings for Selenium
50 Summary(pl.UTF-8):      Wiązania Pythona do Selenium
51 Group:          Development/Languages/Python
52 Suggests:       chromedriver
53 Suggests:       selenium-firefoxdriver
54
55 %description -n python3-%{module}
56 Python language bindings for Selenium WebDriver.
57
58 The selenium package is used to automate web browser interaction from
59 Python.
60
61 %description -n python3-%{module} -l pl.UTF-8
62 Wiązania Pythona do sterownika Selenium WebDriver.
63
64 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
65 poziomu Pythona.
66
67 %prep
68 %setup -q -n %{module}-%{version}
69 %patch0 -p1
70 %patch1 -p1
71
72 %build
73 %if %{with python2}
74 %py_build
75 %endif
76
77 %if %{with python3}
78 %py3_build
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %py_install
86
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 # driver is in selenium-firefoxdriver.spec
95 %if %{with python2}
96 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
97 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
98 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
99 %endif
100
101 %if %{with python3}
102 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
103 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
104 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %files
112 %defattr(644,root,root,755)
113 %doc CHANGES README.rst
114 %{py_sitescriptdir}/%{module}
115 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
116 %endif
117
118 %if %{with python3}
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc CHANGES README.rst
122 %{py3_sitescriptdir}/%{module}
123 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
124 %endif
This page took 0.061667 seconds and 2 git commands to generate.