]> git.pld-linux.org Git - packages/python-selenium.git/blob - python-selenium.spec
- up to 3.11.0
[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 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
9 %define no_install_post_chrpath 1
10
11 %define         _rc     %{nil}
12 %define         module  selenium
13 Summary:        Python bindings for selenium
14 Name:           python-%{module}
15 Version:        3.11.0
16 Release:        1
17 License:        BSD-like
18 Group:          Development/Languages/Python
19 Source0:        https://pypi.debian.net/selenium/%{module}-%{version}%{_rc}.tar.gz
20 # Source0-md5:  c565de302e12ffaf7e59c1e47b45bbef
21 URL:            http://pypi.python.org/pypi/selenium/
22 %if %{with python2}
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-distribute
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.710
30 BuildRequires:  unzip
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Selenium Python Client Driver is a Python language binding for
35 Selenium Remote Control (version 1.0 and 2.0).
36
37 Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
38 supported, as well as the Selenium 1.0 bindings. As work will
39 progresses we'll add more "native" drivers.
40
41 %package -n python3-%{module}
42 Summary:        Python bindings for selenium
43 Group:          Development/Languages/Python
44
45 %description -n python3-%{module}
46 Selenium Python Client Driver is a Python language binding for
47 Selenium Remote Control (version 1.0 and 2.0).
48
49 Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
50 supported, as well as the Selenium 1.0 bindings. As work will
51 progresses we'll add more "native" drivers.
52
53 %package -n firefox-addon-%{module}
54 Summary:        Firefox add-on for python selenium
55 Group:          X11/Applications/Networking
56 Requires:       firefox >= 24.0
57
58 %description -n firefox-addon-%{module}
59 Driver for python selenium.
60
61 %prep
62 %setup -q -n %{module}-%{version}%{_rc}
63
64 %build
65 %if %{with python2}
66 %py_build %{?with_tests:test}
67 %endif
68
69 %if %{with python3}
70 %py3_build %{?with_tests:test}
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %if %{with python2}
77 %py_install
78
79 %py_postclean
80 %endif
81
82 %if %{with python3}
83 %py3_install
84 %endif
85
86 install -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
87 unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
88
89 # remove binaries for incorrect arch
90 %ifnarch %{x8664}
91 %if %{with python2}
92 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/amd64
93 %endif
94 %if %{with python3}
95 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/amd64
96 %endif
97 %endif
98
99 %ifnarch %{ix86}
100 %if %{with python2}
101 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/x86
102 %endif
103 %if %{with python3}
104 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/x86
105 %endif
106 %endif
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %if %{with python2}
112 %files
113 %defattr(644,root,root,755)
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
120 %{py_sitescriptdir}/%{module}
121 %if "%{py_ver}" > "2.4"
122 %{py_sitescriptdir}/%{module}-*.egg-info
123 %endif
124 %endif
125
126 %if %{with python3}
127 %files -n python3-%{module}
128 %defattr(644,root,root,755)
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
135 %{py3_sitescriptdir}/%{module}
136 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
137 %endif
138
139 %ifarch %{x8664} %{ix86}
140 %files -n firefox-addon-%{module}
141 %defattr(644,root,root,755)
142 %{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
143 %endif
This page took 0.20624 seconds and 3 git commands to generate.