]> git.pld-linux.org Git - packages/python-selenium.git/commitdiff
- up to 2.47.1; add python3 subpackages auto/th/python-selenium-2.47.1-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 15 Aug 2015 15:03:48 +0000 (17:03 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 15 Aug 2015 15:03:48 +0000 (17:03 +0200)
python-selenium.spec

index 42b286a001259264c699e8b858b2c55bb10f8216..189e4ec5a8995936898c2780a74ff849d958a4e6 100644 (file)
@@ -1,7 +1,10 @@
 # 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  
+# [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                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@googlecode.com
 unzip $RPM_BUILD_DIR/%{module}-%{version}%{_rc}/py/selenium/webdriver/firefox/webdriver.xpi -d $RPM_BUILD_ROOT%{_datadir}/iceweasel/browser/extensions/fxdriver@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)
This page took 0.112268 seconds and 4 git commands to generate.