]> git.pld-linux.org Git - packages/python-selenium.git/blame - python-selenium.spec
- s/iceweasel/firefox/
[packages/python-selenium.git] / python-selenium.spec
CommitLineData
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 13Summary: Python bindings for selenium
fdc86502 14Name: python-%{module}
98e064fc 15Version: 2.47.1
2555f344 16Release: 5
fdc86502 17License: BSD-like
18Group: Development/Languages/Python
7b47a048 19Source0: http://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}%{_rc}.tar.gz
98e064fc 20# Source0-md5: 7a2e267e8ef5c221bfd6387c2ad5f3bc
fdc86502 21URL: http://pypi.python.org/pypi/selenium/
98e064fc 22%if %{with python2}
fdc86502 23BuildRequires: python-distribute
98e064fc
AM
24%endif
25%if %{with python3}
26BuildRequires: python3-distribute
27%endif
fdc86502 28BuildRequires: rpm-pythonprov
2492db2a 29BuildRequires: rpmbuild(macros) >= 1.710
d25eb6bd 30BuildRequires: unzip
8343e994 31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
fdc86502 32
33%description
8343e994 34Selenium Python Client Driver is a Python language binding for
35Selenium Remote Control (version 1.0 and 2.0).
36
37Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
38supported, as well as the Selenium 1.0 bindings. As work will
39progresses we'll add more "native" drivers.
fdc86502 40
98e064fc 41%package -n python3-%{module}
e63aeb73 42Summary: Python bindings for selenium
98e064fc
AM
43Group: Development/Languages/Python
44
45%description -n python3-%{module}
46Selenium Python Client Driver is a Python language binding for
47Selenium Remote Control (version 1.0 and 2.0).
48
49Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
50supported, as well as the Selenium 1.0 bindings. As work will
51progresses we'll add more "native" drivers.
52
2555f344
JR
53%package -n firefox-addon-%{module}
54Summary: Firefox add-on for python selenium
bc68d90e 55Group: X11/Applications/Networking
2555f344 56Requires: firefox >= 24.0
9b5ae0dd 57
2555f344 58%description -n firefox-addon-%{module}
9b5ae0dd 59Driver 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
74rm -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
JR
86install -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
87unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
9b5ae0dd 88
de91504e 89# remove windows binaries
2555f344 90%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
de91504e
JR
91# remove binaries for incorrect arch
92%ifnarch %{x8664}
2555f344 93%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
4a2fc600 94%if %{with python2}
de91504e
JR
95%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
96%endif
4a2fc600
JR
97%if %{with python3}
98%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
99%endif
100%endif
de91504e 101%ifnarch %{ix86}
2555f344 102%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
4a2fc600 103%if %{with python2}
de91504e
JR
104%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
105%endif
4a2fc600
JR
106%if %{with python3}
107%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
108%endif
109%endif
de91504e 110
fdc86502 111%clean
112rm -rf $RPM_BUILD_ROOT
113
98e064fc 114%if %{with python2}
fdc86502 115%files
116%defattr(644,root,root,755)
c6dc03ff 117#%%doc README*
fdc86502 118%{py_sitescriptdir}/%{module}
119%if "%{py_ver}" > "2.4"
120%{py_sitescriptdir}/%{module}-*.egg-info
121%endif
98e064fc
AM
122%endif
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
127%{py3_sitescriptdir}/%{module}
128%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
129%endif
9b5ae0dd 130
2555f344 131%files -n firefox-addon-%{module}
9b5ae0dd 132%defattr(644,root,root,755)
2555f344 133%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
This page took 0.146266 seconds and 4 git commands to generate.