]> git.pld-linux.org Git - packages/python-selenium.git/blame - python-selenium.spec
- move iceweasel extension to data dir to avoid directory deps problems
[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:
4# [root@appserver4 /usr/share/python2.7/site-packages/selenium/webdriver/firefox]# ln -s ./amd64 x86
9b5ae0dd 5
6%define no_install_post_chrpath 1
7
e2e55d88 8%define _rc %{nil}
7a614ba8 9%define module selenium
8343e994 10Summary: Python bindings for selenium
fdc86502 11Name: python-%{module}
c5d97e55 12Version: 2.39.0
93912b69 13Release: 2
fdc86502 14License: BSD-like
15Group: Development/Languages/Python
7b47a048 16Source0: http://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}%{_rc}.tar.gz
c5d97e55 17# Source0-md5: 3f7aaad3eb52a218854bf0196c9daeda
fdc86502 18URL: http://pypi.python.org/pypi/selenium/
19BuildRequires: python-distribute
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.228
d25eb6bd 22BuildRequires: unzip
8343e994 23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
fdc86502 24
25%description
8343e994 26Selenium Python Client Driver is a Python language binding for
27Selenium Remote Control (version 1.0 and 2.0).
28
29Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
30supported, as well as the Selenium 1.0 bindings. As work will
31progresses we'll add more "native" drivers.
fdc86502 32
7b47a048 33%package -n iceweasel-addon-%{module}
8343e994 34Summary: Iceweasel add-on for python selenium
bc68d90e 35Group: X11/Applications/Networking
7a614ba8 36Requires: iceweasel >= 22.0
9b5ae0dd 37
7b47a048 38%description -n iceweasel-addon-%{module}
9b5ae0dd 39Driver for python selenium.
fdc86502 40
41%prep
7b47a048 42%setup -q -n %{module}-%{version}%{_rc}
fdc86502 43
44%build
45%{__python} setup.py build
46
47%install
48rm -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
93912b69
JR
56install -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com
57unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com
9b5ae0dd 58
de91504e 59# remove windows binaries
93912b69 60%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
de91504e
JR
61# remove binaries for incorrect arch
62%ifnarch %{x8664}
93912b69 63%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
de91504e
JR
64%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
65%endif
66%ifnarch %{ix86}
93912b69 67%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
de91504e
JR
68%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
69%endif
70
fdc86502 71%clean
72rm -rf $RPM_BUILD_ROOT
73
fdc86502 74%files
75%defattr(644,root,root,755)
c6dc03ff 76#%%doc README*
fdc86502 77%{py_sitescriptdir}/%{module}
78%if "%{py_ver}" > "2.4"
79%{py_sitescriptdir}/%{module}-*.egg-info
80%endif
9b5ae0dd 81
7b47a048 82%files -n iceweasel-addon-%{module}
9b5ae0dd 83%defattr(644,root,root,755)
93912b69 84%{_datadir}/iceweasel/browser/extensions/fxdriver@googlecode.com
This page took 0.105355 seconds and 4 git commands to generate.