]>
Commit | Line | Data |
---|---|---|
18a06ec7 MK |
1 | # TODO: |
2 | # Seems on 64bit selenium looks for wrong arch webdriver | |
3 | # Seems to be fixed by ugly hack: | |
98e064fc AM |
4 | # [root@appserver4 /usr/share/python2.7/site-packages/selenium/webdriver/firefox]# ln -s ./amd64 x86 |
5 | ||
6 | %bcond_without python2 # CPython 2.x module | |
7 | %bcond_without python3 # CPython 3.x module | |
9b5ae0dd | 8 | |
9 | %define no_install_post_chrpath 1 | |
10 | ||
e2e55d88 | 11 | %define _rc %{nil} |
7a614ba8 | 12 | %define module selenium |
8343e994 | 13 | Summary: Python bindings for selenium |
fdc86502 | 14 | Name: python-%{module} |
42aa733e | 15 | Version: 3.11.0 |
8d63256d | 16 | Release: 2 |
fdc86502 | 17 | License: BSD-like |
18 | Group: Development/Languages/Python | |
42aa733e AM |
19 | Source0: https://pypi.debian.net/selenium/%{module}-%{version}%{_rc}.tar.gz |
20 | # Source0-md5: c565de302e12ffaf7e59c1e47b45bbef | |
fdc86502 | 21 | URL: http://pypi.python.org/pypi/selenium/ |
98e064fc | 22 | %if %{with python2} |
fdc86502 | 23 | BuildRequires: python-distribute |
98e064fc AM |
24 | %endif |
25 | %if %{with python3} | |
26 | BuildRequires: python3-distribute | |
27 | %endif | |
fdc86502 | 28 | BuildRequires: rpm-pythonprov |
2492db2a | 29 | BuildRequires: rpmbuild(macros) >= 1.710 |
d25eb6bd | 30 | BuildRequires: unzip |
8343e994 | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
fdc86502 | 32 | |
33 | %description | |
8343e994 | 34 | Selenium Python Client Driver is a Python language binding for |
35 | Selenium Remote Control (version 1.0 and 2.0). | |
36 | ||
37 | Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are | |
38 | supported, as well as the Selenium 1.0 bindings. As work will | |
39 | progresses we'll add more "native" drivers. | |
fdc86502 | 40 | |
98e064fc | 41 | %package -n python3-%{module} |
e63aeb73 | 42 | Summary: Python bindings for selenium |
98e064fc AM |
43 | Group: Development/Languages/Python |
44 | ||
45 | %description -n python3-%{module} | |
46 | Selenium Python Client Driver is a Python language binding for | |
47 | Selenium Remote Control (version 1.0 and 2.0). | |
48 | ||
49 | Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are | |
50 | supported, as well as the Selenium 1.0 bindings. As work will | |
51 | progresses we'll add more "native" drivers. | |
52 | ||
2555f344 JR |
53 | %package -n firefox-addon-%{module} |
54 | Summary: Firefox add-on for python selenium | |
bc68d90e | 55 | Group: X11/Applications/Networking |
2555f344 | 56 | Requires: firefox >= 24.0 |
9b5ae0dd | 57 | |
2555f344 | 58 | %description -n firefox-addon-%{module} |
9b5ae0dd | 59 | Driver for python selenium. |
fdc86502 | 60 | |
61 | %prep | |
7b47a048 | 62 | %setup -q -n %{module}-%{version}%{_rc} |
fdc86502 | 63 | |
64 | %build | |
98e064fc | 65 | %if %{with python2} |
3b3909a7 | 66 | %py_build %{?with_tests:test} |
98e064fc AM |
67 | %endif |
68 | ||
69 | %if %{with python3} | |
3b3909a7 | 70 | %py3_build %{?with_tests:test} |
98e064fc | 71 | %endif |
fdc86502 | 72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
98e064fc AM |
75 | |
76 | %if %{with python2} | |
3b3909a7 | 77 | %py_install |
fdc86502 | 78 | |
79 | %py_postclean | |
98e064fc AM |
80 | %endif |
81 | ||
82 | %if %{with python3} | |
3b3909a7 | 83 | %py3_install |
98e064fc | 84 | %endif |
fdc86502 | 85 | |
2555f344 | 86 | install -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com |
42aa733e | 87 | unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com |
9b5ae0dd | 88 | |
de91504e JR |
89 | # remove binaries for incorrect arch |
90 | %ifnarch %{x8664} | |
4a2fc600 | 91 | %if %{with python2} |
42aa733e | 92 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/amd64 |
de91504e | 93 | %endif |
4a2fc600 | 94 | %if %{with python3} |
42aa733e | 95 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/amd64 |
4a2fc600 JR |
96 | %endif |
97 | %endif | |
42aa733e | 98 | |
de91504e | 99 | %ifnarch %{ix86} |
4a2fc600 | 100 | %if %{with python2} |
42aa733e | 101 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/x86 |
de91504e | 102 | %endif |
4a2fc600 | 103 | %if %{with python3} |
42aa733e | 104 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/x86 |
4a2fc600 JR |
105 | %endif |
106 | %endif | |
de91504e | 107 | |
fdc86502 | 108 | %clean |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
98e064fc | 111 | %if %{with python2} |
fdc86502 | 112 | %files |
113 | %defattr(644,root,root,755) | |
42aa733e AM |
114 | %dir %{py_sitedir}/selenium |
115 | %dir %{py_sitedir}/selenium/webdriver | |
116 | %{py_sitedir}/selenium/webdriver/remote | |
117 | %dir %{py_sitedir}/selenium/webdriver/firefox | |
8d63256d | 118 | %dir %{py_sitedir}/selenium/webdriver/firefox/[ax]* |
42aa733e | 119 | %attr(755,root,root) %{py_sitedir}/selenium/webdriver/firefox/*/x_ignore_nofocus.so |
fdc86502 | 120 | %{py_sitescriptdir}/%{module} |
121 | %if "%{py_ver}" > "2.4" | |
122 | %{py_sitescriptdir}/%{module}-*.egg-info | |
123 | %endif | |
98e064fc AM |
124 | %endif |
125 | ||
126 | %if %{with python3} | |
127 | %files -n python3-%{module} | |
128 | %defattr(644,root,root,755) | |
42aa733e AM |
129 | %dir %{py3_sitedir}/selenium |
130 | %dir %{py3_sitedir}/selenium/webdriver | |
131 | %{py3_sitedir}/selenium/webdriver/remote | |
132 | %dir %{py3_sitedir}/selenium/webdriver/firefox | |
8d63256d | 133 | %dir %{py3_sitedir}/selenium/webdriver/firefox/[ax]* |
42aa733e | 134 | %attr(755,root,root) %{py3_sitedir}/selenium/webdriver/firefox/*/x_ignore_nofocus.so |
98e064fc AM |
135 | %{py3_sitescriptdir}/%{module} |
136 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
137 | %endif | |
9b5ae0dd | 138 | |
97d1ee0a | 139 | %ifarch %{x8664} %{ix86} |
2555f344 | 140 | %files -n firefox-addon-%{module} |
9b5ae0dd | 141 | %defattr(644,root,root,755) |
2555f344 | 142 | %{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com |
97d1ee0a | 143 | %endif |