[packages/python-selenium] - up to 2.47.1; add python3 subpackages

arekm arekm at pld-linux.org
Sat Aug 15 17:03:54 CEST 2015


commit 98e064fca5e6f25369a8502946ac1dc5488da38f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Aug 15 17:03:48 2015 +0200

    - up to 2.47.1; add python3 subpackages

 python-selenium.spec | 60 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 54 insertions(+), 6 deletions(-)
---
diff --git a/python-selenium.spec b/python-selenium.spec
index 42b286a..189e4ec 100644
--- a/python-selenium.spec
+++ b/python-selenium.spec
@@ -1,7 +1,10 @@
 # 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  
+# [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
 
@@ -9,14 +12,19 @@
 %define		module	selenium
 Summary:	Python bindings for selenium
 Name:		python-%{module}
-Version:	2.44.0
+Version:	2.47.1
 Release:	1
 License:	BSD-like
 Group:		Development/Languages/Python
 Source0:	http://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}%{_rc}.tar.gz
-# Source0-md5:	8802d73fb989d007ba1b43f070361cd1
+# Source0-md5:	7a2e267e8ef5c221bfd6387c2ad5f3bc
 URL:		http://pypi.python.org/pypi/selenium/
+%if %{with python2}
 BuildRequires:	python-distribute
+%endif
+%if %{with python3}
+BuildRequires:	python3-distribute
+%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.228
 BuildRequires:	unzip
@@ -30,6 +38,19 @@ 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 python3-%{module}
+Summary:	-
+Summary(pl.UTF-8):	-
+Group:		Development/Languages/Python
+
+%description -n python3-%{module}
+Selenium Python Client Driver is a Python language binding for
+Selenium Remote Control (version 1.0 and 2.0).
+
+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 iceweasel-addon-%{module}
 Summary:	Iceweasel add-on for python selenium
 Group:		X11/Applications/Networking
@@ -42,16 +63,34 @@ Driver for python selenium.
 %setup -q -n %{module}-%{version}%{_rc}
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
-	--skip-build \
+
+%if %{with python2}
+%{__python} setup.py \
+	build --build-base build-2 \
+	install --skip-build \
 	--optimize=2 \
 	--root=$RPM_BUILD_ROOT
 
 %py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+	build --build-base build-3 \
+	install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+%endif
 
 install -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver at googlecode.com
 unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver at googlecode.com
@@ -71,6 +110,7 @@ unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/we
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 #%%doc README*
@@ -78,6 +118,14 @@ rm -rf $RPM_BUILD_ROOT
 %if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/%{module}-*.egg-info
 %endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
 
 %files -n iceweasel-addon-%{module}
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-selenium.git/commitdiff/98e064fca5e6f25369a8502946ac1dc5488da38f



More information about the pld-cvs-commit mailing list