]> git.pld-linux.org Git - packages/python-selenium.git/blob - python-selenium.spec
06f2fcc84f947bf64b6e41dda46f0ea9222caa56
[packages/python-selenium.git] / python-selenium.spec
1 # TODO:
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  
5
6 %define no_install_post_chrpath 1
7
8 %define         _rc     %{nil}
9 %define         module  selenium
10 Summary:        Python bindings for selenium
11 Name:           python-%{module}
12 Version:        2.39.0
13 Release:        1
14 License:        BSD-like
15 Group:          Development/Languages/Python
16 Source0:        http://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}%{_rc}.tar.gz
17 # Source0-md5:  3f7aaad3eb52a218854bf0196c9daeda
18 URL:            http://pypi.python.org/pypi/selenium/
19 BuildRequires:  python-distribute
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.228
22 BuildRequires:  unzip
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Selenium Python Client Driver is a Python language binding for
27 Selenium Remote Control (version 1.0 and 2.0).
28
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.
32
33 %package -n iceweasel-addon-%{module}
34 Summary:        Iceweasel add-on for python selenium
35 Group:          X11/Applications/Networking
36 Requires:       iceweasel >= 22.0
37
38 %description -n iceweasel-addon-%{module}
39 Driver for python selenium.
40
41 %prep
42 %setup -q -n %{module}-%{version}%{_rc}
43
44 %build
45 %{__python} setup.py build
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__python} setup.py install \
50         --skip-build \
51         --optimize=2 \
52         --root=$RPM_BUILD_ROOT
53
54 %py_postclean
55
56 install -d $RPM_BUILD_ROOT%{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com
57 unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com
58
59 # remove windows binaries
60 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
61 # remove binaries for incorrect arch
62 %ifnarch %{x8664}
63 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
64 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
65 %endif
66 %ifnarch %{ix86}
67 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
68 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
69 %endif
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
75 %defattr(644,root,root,755)
76 #%%doc README*
77 %{py_sitescriptdir}/%{module}
78 %if "%{py_ver}" > "2.4"
79 %{py_sitescriptdir}/%{module}-*.egg-info
80 %endif
81
82 %files -n iceweasel-addon-%{module}
83 %defattr(644,root,root,755)
84 %{_libdir}/iceweasel/browser/extensions/fxdriver@googlecode.com
This page took 0.091344 seconds and 2 git commands to generate.