2 # Seems on 64bit selenium looks for wrong arch webdriver
3 # Seems to be fixed by ugly hack:
4 # [root@appserver4 /usr/share/python2.7/site-packages/selenium/webdriver/firefox]# ln -s ./amd64 x86
6 %define no_install_post_chrpath 1
9 %define module selenium
10 Summary: Python bindings for selenium
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 Source0: http://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}%{_rc}.tar.gz
17 # Source0-md5: 8802d73fb989d007ba1b43f070361cd1
18 URL: http://pypi.python.org/pypi/selenium/
19 BuildRequires: python-distribute
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.228
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Selenium Python Client Driver is a Python language binding for
27 Selenium Remote Control (version 1.0 and 2.0).
29 Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
30 supported, as well as the Selenium 1.0 bindings. As work will
31 progresses we'll add more "native" drivers.
33 %package -n iceweasel-addon-%{module}
34 Summary: Iceweasel add-on for python selenium
35 Group: X11/Applications/Networking
36 Requires: iceweasel >= 24.0
38 %description -n iceweasel-addon-%{module}
39 Driver for python selenium.
42 %setup -q -n %{module}-%{version}%{_rc}
45 %{__python} setup.py build
48 rm -rf $RPM_BUILD_ROOT
49 %{__python} setup.py install \
52 --root=$RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com
57 unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com
59 # remove windows binaries
60 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
61 # remove binaries for incorrect arch
63 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
64 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
67 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
68 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
77 %{py_sitescriptdir}/%{module}
78 %if "%{py_ver}" > "2.4"
79 %{py_sitescriptdir}/%{module}-*.egg-info
82 %files -n iceweasel-addon-%{module}
83 %defattr(644,root,root,755)
84 %{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com