]>
Commit | Line | Data |
---|---|---|
4beb96ea JB |
1 | # |
2 | # Conditional build: | |
98e064fc AM |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
9b5ae0dd | 5 | |
7a614ba8 | 6 | %define module selenium |
4beb96ea JB |
7 | Summary: Python bindings for Selenium |
8 | Summary(pl.UTF-8): Wiązania Pythona do Selenium | |
fdc86502 | 9 | Name: python-%{module} |
4beb96ea | 10 | Version: 3.141.0 |
5ef62748 | 11 | Release: 7 |
4beb96ea | 12 | License: Apache v2.0 |
fdc86502 | 13 | Group: Development/Languages/Python |
4beb96ea JB |
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/ | |
98e064fc | 20 | %if %{with python2} |
4beb96ea JB |
21 | BuildRequires: python-modules >= 1:2.7 |
22 | BuildRequires: python-setuptools | |
98e064fc AM |
23 | %endif |
24 | %if %{with python3} | |
4beb96ea JB |
25 | BuildRequires: python3-modules >= 1:3.4 |
26 | BuildRequires: python3-setuptools | |
98e064fc | 27 | %endif |
fdc86502 | 28 | BuildRequires: rpm-pythonprov |
4beb96ea | 29 | BuildRequires: rpmbuild(macros) >= 1.714 |
d25eb6bd | 30 | BuildRequires: unzip |
4beb96ea JB |
31 | Suggests: chromedriver |
32 | Suggests: selenium-firefoxdriver | |
bad90d2b | 33 | BuildArch: noarch |
8343e994 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
fdc86502 | 35 | |
36 | %description | |
4beb96ea | 37 | Python language bindings for Selenium WebDriver. |
8343e994 | 38 | |
4beb96ea JB |
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. | |
fdc86502 | 47 | |
98e064fc | 48 | %package -n python3-%{module} |
4beb96ea JB |
49 | Summary: Python bindings for Selenium |
50 | Summary(pl.UTF-8): Wiązania Pythona do Selenium | |
98e064fc | 51 | Group: Development/Languages/Python |
4beb96ea JB |
52 | Suggests: chromedriver |
53 | Suggests: selenium-firefoxdriver | |
98e064fc AM |
54 | |
55 | %description -n python3-%{module} | |
4beb96ea JB |
56 | Python language bindings for Selenium WebDriver. |
57 | ||
58 | The selenium package is used to automate web browser interaction from | |
59 | Python. | |
98e064fc | 60 | |
4beb96ea JB |
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. | |
98e064fc | 66 | |
fdc86502 | 67 | %prep |
4beb96ea | 68 | %setup -q -n %{module}-%{version} |
bad90d2b AM |
69 | %patch0 -p1 |
70 | %patch1 -p1 | |
fdc86502 | 71 | |
72 | %build | |
98e064fc | 73 | %if %{with python2} |
4beb96ea | 74 | %py_build |
98e064fc AM |
75 | %endif |
76 | ||
77 | %if %{with python3} | |
4beb96ea | 78 | %py3_build |
98e064fc | 79 | %endif |
fdc86502 | 80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
98e064fc AM |
83 | |
84 | %if %{with python2} | |
3b3909a7 | 85 | %py_install |
fdc86502 | 86 | |
87 | %py_postclean | |
98e064fc AM |
88 | %endif |
89 | ||
90 | %if %{with python3} | |
3b3909a7 | 91 | %py3_install |
98e064fc | 92 | %endif |
fdc86502 | 93 | |
bad90d2b | 94 | # driver is in selenium-firefoxdriver.spec |
4a2fc600 | 95 | %if %{with python2} |
4beb96ea | 96 | %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi |
ee516b86 | 97 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64 |
ee516b86 | 98 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86 |
de91504e | 99 | %endif |
bad90d2b | 100 | |
4a2fc600 | 101 | %if %{with python3} |
4beb96ea | 102 | %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi |
bad90d2b | 103 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64 |
ee516b86 | 104 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86 |
4a2fc600 | 105 | %endif |
de91504e | 106 | |
fdc86502 | 107 | %clean |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
98e064fc | 110 | %if %{with python2} |
fdc86502 | 111 | %files |
112 | %defattr(644,root,root,755) | |
4beb96ea | 113 | %doc CHANGES README.rst |
fdc86502 | 114 | %{py_sitescriptdir}/%{module} |
4beb96ea | 115 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
98e064fc AM |
116 | %endif |
117 | ||
118 | %if %{with python3} | |
119 | %files -n python3-%{module} | |
120 | %defattr(644,root,root,755) | |
4beb96ea | 121 | %doc CHANGES README.rst |
98e064fc AM |
122 | %{py3_sitescriptdir}/%{module} |
123 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
124 | %endif |