]> git.pld-linux.org Git - packages/python-selenium.git/blame - python-selenium.spec
- up to 3.11.0
[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}
42aa733e
AM
15Version: 3.11.0
16Release: 1
fdc86502 17License: BSD-like
18Group: Development/Languages/Python
42aa733e
AM
19Source0: https://pypi.debian.net/selenium/%{module}-%{version}%{_rc}.tar.gz
20# Source0-md5: c565de302e12ffaf7e59c1e47b45bbef
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 86install -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
42aa733e 87unzip $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
109rm -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
118%dir %{py_sitedir}/selenium/webdriver/firefox/[ai]*
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
133%dir %{py3_sitedir}/selenium/webdriver/firefox/[ai]*
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
This page took 0.185164 seconds and 4 git commands to generate.