[packages/python-selenium] - rel 4; firefox addon in selenium-firefoxdriver.spec; make this noarch package
arekm
arekm at pld-linux.org
Wed Apr 11 09:19:14 CEST 2018
commit bad90d2b79bcf70de438a08e0b5f013b16eaa6f7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Apr 11 09:19:06 2018 +0200
- rel 4; firefox addon in selenium-firefoxdriver.spec; make this noarch package
python-selenium.spec | 57 ++++++++--------------------------------------------
1 file changed, 8 insertions(+), 49 deletions(-)
---
diff --git a/python-selenium.spec b/python-selenium.spec
index fe2e828..f97068d 100644
--- a/python-selenium.spec
+++ b/python-selenium.spec
@@ -1,13 +1,6 @@
-# TODO:
-# Seems on 64bit selenium looks for wrong arch webdriver
-# Seems to be fixed by ugly hack:
-# [root at 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 at googlecode.com
-unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/firefox/browser/extensions/fxdriver at 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 at googlecode.com
-%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-selenium.git/commitdiff/bad90d2b79bcf70de438a08e0b5f013b16eaa6f7
More information about the pld-cvs-commit
mailing list