3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module selenium
7 Summary: Python bindings for Selenium
8 Summary(pl.UTF-8): Wiązania Pythona do Selenium
10 # keep 3.x here for python2 support
14 Group: Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/selenium/
16 Source0: https://files.pythonhosted.org/packages/source/s/selenium/%{module}-%{version}.tar.gz
17 # Source0-md5: 274693e383ff507df7ee190359828c84
18 Patch0: xpi-path.patch
19 Patch1: 0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
20 URL: https://pypi.org/project/selenium/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.4
27 BuildRequires: python3-setuptools
29 BuildRequires: rpm-pythonprov
30 BuildRequires: rpmbuild(macros) >= 1.714
32 Suggests: chromedriver
33 Suggests: selenium-firefoxdriver
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Python language bindings for Selenium WebDriver.
40 The selenium package is used to automate web browser interaction from
43 %description -l pl.UTF-8
44 Wiązania Pythona do sterownika Selenium WebDriver.
46 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
49 %package -n python3-%{module}
50 Summary: Python bindings for Selenium
51 Summary(pl.UTF-8): Wiązania Pythona do Selenium
52 Group: Development/Languages/Python
53 Suggests: chromedriver
54 Suggests: selenium-firefoxdriver
56 %description -n python3-%{module}
57 Python language bindings for Selenium WebDriver.
59 The selenium package is used to automate web browser interaction from
62 %description -n python3-%{module} -l pl.UTF-8
63 Wiązania Pythona do sterownika Selenium WebDriver.
65 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
69 %setup -q -n %{module}-%{version}
83 rm -rf $RPM_BUILD_ROOT
95 # driver is in selenium-firefoxdriver.spec
97 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
98 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
99 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
103 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
104 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
105 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc CHANGES README.rst
115 %{py_sitescriptdir}/%{module}
116 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
120 %files -n python3-%{module}
121 %defattr(644,root,root,755)
122 %doc CHANGES README.rst
123 %{py3_sitescriptdir}/%{module}
124 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info