[packages/python-selenium] - updated to 3.141.0 - removed outdated x-ignore-nofocus-path patch - drop webdriver.xpi from python
qboosh
qboosh at pld-linux.org
Sat Jan 30 16:46:58 CET 2021
commit 4beb96ea991f830fd7eb3ac7103b30f8decdbde6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 30 16:47:15 2021 +0100
- updated to 3.141.0
- removed outdated x-ignore-nofocus-path patch
- drop webdriver.xpi from python packages, rely on selenium-firefoxdriver
- added Suggests: selenium-firefoxdriver, chromedriver
python-selenium.spec | 86 +++++++++++++++++++++++++++------------------
x-ignore-nofocus-path.patch | 41 ---------------------
2 files changed, 52 insertions(+), 75 deletions(-)
---
diff --git a/python-selenium.spec b/python-selenium.spec
index 28fd0d8..b58091a 100644
--- a/python-selenium.spec
+++ b/python-selenium.spec
@@ -1,65 +1,81 @@
+#
+# Conditional build:
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
-%define _rc %{nil}
%define module selenium
-Summary: Python bindings for selenium
+Summary: Python bindings for Selenium
+Summary(pl.UTF-8): Wiązania Pythona do Selenium
Name: python-%{module}
-Version: 3.11.0
-Release: 8
-License: BSD-like
+Version: 3.141.0
+Release: 1
+License: Apache v2.0
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
-Patch2: 0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
-URL: http://pypi.python.org/pypi/selenium/
+#Source0Download: https://pypi.org/simple/selenium/
+Source0: https://files.pythonhosted.org/packages/source/s/selenium/%{module}-%{version}.tar.gz
+# Source0-md5: 274693e383ff507df7ee190359828c84
+Patch0: xpi-path.patch
+Patch1: 0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
+URL: https://pypi.org/project/selenium/
%if %{with python2}
-BuildRequires: python-distribute
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
%endif
%if %{with python3}
-BuildRequires: python3-distribute
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: unzip
+Suggests: chromedriver
+Suggests: selenium-firefoxdriver
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Selenium Python Client Driver is a Python language binding for
-Selenium Remote Control (version 1.0 and 2.0).
+Python language bindings for Selenium WebDriver.
-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.
+The selenium package is used to automate web browser interaction from
+Python.
+
+%description -l pl.UTF-8
+Wiązania Pythona do sterownika Selenium WebDriver.
+
+Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
+poziomu Pythona.
%package -n python3-%{module}
-Summary: Python bindings for selenium
+Summary: Python bindings for Selenium
+Summary(pl.UTF-8): Wiązania Pythona do Selenium
Group: Development/Languages/Python
+Suggests: chromedriver
+Suggests: selenium-firefoxdriver
%description -n python3-%{module}
-Selenium Python Client Driver is a Python language binding for
-Selenium Remote Control (version 1.0 and 2.0).
+Python language bindings for Selenium WebDriver.
+
+The selenium package is used to automate web browser interaction from
+Python.
-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.
+%description -n python3-%{module} -l pl.UTF-8
+Wiązania Pythona do sterownika Selenium WebDriver.
+
+Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
+poziomu Pythona.
%prep
-%setup -q -n %{module}-%{version}%{_rc}
+%setup -q -n %{module}-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
%endif
%install
@@ -77,13 +93,15 @@ rm -rf $RPM_BUILD_ROOT
# driver is in selenium-firefoxdriver.spec
%if %{with python2}
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/webdriver/remote/*.js
+%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/remote/*.js
+%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
%endif
%if %{with python3}
-%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/webdriver/remote/*.js
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/remote/*.js
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
%endif
@@ -94,15 +112,15 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
+%doc CHANGES README.rst
%{py_sitescriptdir}/%{module}
-%if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
-%endif
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
+%doc CHANGES README.rst
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
diff --git a/x-ignore-nofocus-path.patch b/x-ignore-nofocus-path.patch
deleted file mode 100644
index 7e20232..0000000
--- a/x-ignore-nofocus-path.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/selenium/webdriver/firefox/firefox_binary.py b/selenium/webdriver/firefox/firefox_binary.py
-index f619f1e..5db7afc 100644
---- a/selenium/webdriver/firefox/firefox_binary.py
-+++ b/selenium/webdriver/firefox/firefox_binary.py
-@@ -191,6 +191,8 @@ class FirefoxBinary(object):
-
- def _extract_and_check(self, profile, no_focus_so_name, x86, amd64):
-
-+ os_lib_path = '/usr/' + sys.lib + '/firefoxdriver'
-+
- paths = [x86, amd64]
- built_path = ""
- for path in paths:
-@@ -199,7 +201,7 @@ class FirefoxBinary(object):
- os.makedirs(library_path)
- import shutil
- shutil.copy(os.path.join(
-- os.path.dirname(__file__),
-+ os_lib_path,
- path,
- self.NO_FOCUS_LIBRARY_NAME),
- library_path)
-diff --git a/setup.py b/setup.py
-index 779ae5e..0e6335d 100755
---- a/setup.py
-+++ b/setup.py
-@@ -68,12 +68,10 @@ setup_args = {
- 'selenium.webdriver.remote',
- 'selenium.webdriver.support', ],
- 'package_data': {
-- 'selenium.webdriver.firefox': ['*.xpi', 'webdriver_prefs.json'],
-+ 'selenium.webdriver.firefox': ['webdriver_prefs.json'],
- 'selenium.webdriver.remote': ['getAttribute.js', 'isDisplayed.js'],
- },
-- 'data_files': [('selenium/webdriver/firefox/x86', ['selenium/webdriver/firefox/x86/x_ignore_nofocus.so']),
-- ('selenium/webdriver/firefox/amd64', ['selenium/webdriver/firefox/amd64/x_ignore_nofocus.so']),
-- ('selenium/webdriver/remote', ['selenium/webdriver/remote/getAttribute.js']),
-+ 'data_files': [('selenium/webdriver/remote', ['selenium/webdriver/remote/getAttribute.js']),
- ('selenium/webdriver/remote', ['selenium/webdriver/remote/isDisplayed.js'])],
- 'include_package_data': True,
- 'zip_safe': False
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-selenium.git/commitdiff/4beb96ea991f830fd7eb3ac7103b30f8decdbde6
More information about the pld-cvs-commit
mailing list