]> git.pld-linux.org Git - packages/python-selenium.git/blobdiff - python-selenium.spec
- rel 4; firefox addon in selenium-firefoxdriver.spec; make this noarch package
[packages/python-selenium.git] / python-selenium.spec
index fe2e8287ba716a72d007138c54b0f597a037d1be..f97068d53e8ae161daf3fb11dea111012b77151b 100644 (file)
@@ -1,13 +1,6 @@
-# TODO:
-# Seems on 64bit selenium looks for wrong arch webdriver
-# Seems to be fixed by ugly hack:
-# [root@appserver4 /usr/share/python2.7/site-packages/selenium/webdriver/firefox]# ln -s ./amd64 x86
-
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
-%define        no_install_post_chrpath 1
-
 %define                _rc     %{nil}
 %define                module  selenium
 Summary:       Python bindings for selenium
@@ -18,6 +11,8 @@ License:      BSD-like
 Group:         Development/Languages/Python
 Source0:       https://pypi.debian.net/selenium/%{module}-%{version}%{_rc}.tar.gz
 # Source0-md5: c565de302e12ffaf7e59c1e47b45bbef
+Patch0:                x-ignore-nofocus-path.patch
+Patch1:                xpi-path.patch
 URL:           http://pypi.python.org/pypi/selenium/
 %if %{with python2}
 BuildRequires: python-distribute
@@ -28,6 +23,7 @@ BuildRequires:        python3-distribute
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.710
 BuildRequires: unzip
+BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -50,16 +46,10 @@ Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are
 supported, as well as the Selenium 1.0 bindings. As work will
 progresses we'll add more "native" drivers.
 
-%package -n firefox-addon-%{module}
-Summary:       Firefox add-on for python selenium
-Group:         X11/Applications/Networking
-Requires:      firefox >= 24.0
-
-%description -n firefox-addon-%{module}
-Driver for python selenium.
-
 %prep
 %setup -q -n %{module}-%{version}%{_rc}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %if %{with python2}
@@ -83,31 +73,16 @@ rm -rf $RPM_BUILD_ROOT
 %py3_install
 %endif
 
-install -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
-unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
-
-# remove binaries for incorrect arch
-%ifnarch %{x8664}
+# driver is in selenium-firefoxdriver.spec
 %if %{with python2}
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/amd64
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
-%endif
-%if %{with python3}
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/amd64
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
-%endif
-%endif
-
-%ifnarch %{ix86}
-%if %{with python2}
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/firefox/x86
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
 %endif
+
 %if %{with python3}
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/firefox/x86
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
 %endif
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -118,11 +93,6 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_sitedir}/selenium
 %dir %{py_sitedir}/selenium/webdriver
 %{py_sitedir}/selenium/webdriver/remote
-%ifarch %{x8664} %{ix86}
-%dir %{py_sitedir}/selenium/webdriver/firefox
-%dir %{py_sitedir}/selenium/webdriver/firefox/[ax]*
-%attr(755,root,root) %{py_sitedir}/selenium/webdriver/firefox/*/x_ignore_nofocus.so
-%endif
 %{py_sitescriptdir}/%{module}
 %if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/%{module}-*.egg-info
@@ -135,17 +105,6 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py3_sitedir}/selenium
 %dir %{py3_sitedir}/selenium/webdriver
 %{py3_sitedir}/selenium/webdriver/remote
-%ifarch %{x8664} %{ix86}
-%dir %{py3_sitedir}/selenium/webdriver/firefox
-%dir %{py3_sitedir}/selenium/webdriver/firefox/[ax]*
-%attr(755,root,root) %{py3_sitedir}/selenium/webdriver/firefox/*/x_ignore_nofocus.so
-%endif
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
-
-%ifarch %{x8664} %{ix86}
-%files -n firefox-addon-%{module}
-%defattr(644,root,root,755)
-%{_datadir}/firefox/browser/extensions/fxdriver@googlecode.com
-%endif
This page took 0.055654 seconds and 4 git commands to generate.