[packages/python3-selenium] - python-selenium.spec updated to 4.39.0 for python 3.10+
qboosh
qboosh at pld-linux.org
Fri Dec 12 05:50:16 CET 2025
commit a03728482113bb9925acd7b543ed8ddfdc11ee2a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Dec 12 05:50:27 2025 +0100
- python-selenium.spec updated to 4.39.0 for python 3.10+
...-location-of-chromedriver-from-chromium-d.patch | 22 ----
python-selenium.spec | 125 ---------------------
python3-selenium.spec | 118 +++++++++++++++++++
xpi-path.patch | 23 ----
4 files changed, 118 insertions(+), 170 deletions(-)
---
diff --git a/python-selenium.spec b/python-selenium.spec
deleted file mode 100644
index fb468df..0000000
--- a/python-selenium.spec
+++ /dev/null
@@ -1,125 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-%define module selenium
-Summary: Python bindings for Selenium
-Summary(pl.UTF-8): Wiązania Pythona do Selenium
-Name: python-%{module}
-# keep 3.x here for python2 support
-Version: 3.141.0
-Release: 9
-License: Apache v2.0
-Group: Development/Languages/Python
-#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-modules >= 1:2.7
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
-BuildRequires: python3-setuptools
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-BuildRequires: unzip
-Suggests: chromedriver
-Suggests: selenium-firefoxdriver
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Python language bindings for Selenium WebDriver.
-
-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(pl.UTF-8): Wiązania Pythona do Selenium
-Group: Development/Languages/Python
-Suggests: chromedriver
-Suggests: selenium-firefoxdriver
-
-%description -n python3-%{module}
-Python language bindings for Selenium WebDriver.
-
-The selenium package is used to automate web browser interaction from
-Python.
-
-%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}
-%patch -P 0 -p1
-%patch -P 1 -p1
-
-%build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-# driver is in selenium-firefoxdriver.spec
-%if %{with python2}
-%{__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_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
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc CHANGES README.rst
-%{py_sitescriptdir}/%{module}
-%{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/python3-selenium.spec b/python3-selenium.spec
new file mode 100644
index 0000000..cb22a6a
--- /dev/null
+++ b/python3-selenium.spec
@@ -0,0 +1,118 @@
+%define module selenium
+Summary: Python bindings for Selenium
+Summary(pl.UTF-8): Wiązania Pythona do Selenium
+Name: python3-%{module}
+Version: 4.39.0
+Release: 1
+License: Apache v2.0
+Group: Development/Languages/Python
+#Source0Download: https://pypi.org/simple/selenium/
+Source0: https://files.pythonhosted.org/packages/source/s/selenium/%{module}-%{version}.tar.gz
+# Source0-md5: 334b7d61d8bc8c8937a001fb2f503674
+# cargo vendor-filterer --platform='*-unknown-linux-*' --tier=2
+Source1: selenium-%{version}-vendor.tar.xz
+# Source1-md5: c537a42e1cb8981e9d40209a3e0937c3
+URL: https://pypi.org/project/selenium/
+BuildRequires: python3-modules >= 1:3.10
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_rust
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.050
+BuildRequires: rust
+%{?rust_req}
+Requires: python3-modules >= 1:3.10
+%ifarch %{x8664}
+Suggests: chromedriver
+%endif
+%ifarch %{ix86} %{x8664}
+Suggests: firefox-geckodriver
+%endif
+ExclusiveArch: %{rust_arches}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python language bindings for Selenium WebDriver.
+
+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.
+
+%prep
+%setup -q -n %{module}-%{version} -a1
+
+# use our offline registry
+export CARGO_HOME="$(pwd)/.cargo"
+
+mkdir -p "$CARGO_HOME"
+cat >.cargo/config.toml <<EOF
+[source.crates-io]
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/vendor'
+EOF
+
+%build
+export CARGO_HOME="$(pwd)"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+export PYO3_CROSS_LIB_DIR=%{_libdir}
+%endif
+
+%py3_build_pyproject
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export CARGO_HOME="$(pwd)"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES README.rst
+%dir %{py3_sitedir}/selenium
+%{py3_sitedir}/selenium/*.py
+%{py3_sitedir}/selenium/py.typed
+%{py3_sitedir}/selenium/__pycache__
+%{py3_sitedir}/selenium/common
+%dir %{py3_sitedir}/selenium/webdriver
+%{py3_sitedir}/selenium/webdriver/*.py
+%{py3_sitedir}/selenium/webdriver/__pycache__
+%{py3_sitedir}/selenium/webdriver/chrome
+%{py3_sitedir}/selenium/webdriver/chromium
+%dir %{py3_sitedir}/selenium/webdriver/common
+%attr(755,root,root) %{py3_sitedir}/selenium/webdriver/common/selenium-manager
+%{py3_sitedir}/selenium/webdriver/common/*.js
+%{py3_sitedir}/selenium/webdriver/common/*.py
+%{py3_sitedir}/selenium/webdriver/common/__pycache__
+%{py3_sitedir}/selenium/webdriver/common/actions
+%{py3_sitedir}/selenium/webdriver/common/bidi
+%{py3_sitedir}/selenium/webdriver/common/devtools
+%{py3_sitedir}/selenium/webdriver/common/fedcm
+%{py3_sitedir}/selenium/webdriver/edge
+%{py3_sitedir}/selenium/webdriver/firefox
+%{py3_sitedir}/selenium/webdriver/ie
+%{py3_sitedir}/selenium/webdriver/remote
+%{py3_sitedir}/selenium/webdriver/safari
+%{py3_sitedir}/selenium/webdriver/support
+%{py3_sitedir}/selenium/webdriver/webkitgtk
+%{py3_sitedir}/selenium/webdriver/wpewebkit
+%{py3_sitedir}/selenium-%{version}.dist-info
diff --git a/0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch b/0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
deleted file mode 100644
index fd6c1ad..0000000
--- a/0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Sascha Girrulat <sascha at girrulat.de>
-Date: Sat, 9 Dec 2017 18:08:09 +0100
-Subject: Pick debian location of chromedriver from chromium-driver package
-
-Closes: #854732
----
- selenium/webdriver/chrome/webdriver.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/selenium/webdriver/chrome/webdriver.py b/selenium/webdriver/chrome/webdriver.py
-index 0253340..4724035 100644
---- a/selenium/webdriver/chrome/webdriver.py
-+++ b/selenium/webdriver/chrome/webdriver.py
-@@ -30,7 +30,7 @@ class WebDriver(RemoteWebDriver):
- http://chromedriver.storage.googleapis.com/index.html
- """
-
-- def __init__(self, executable_path="chromedriver", port=0,
-+ def __init__(self, executable_path="/usr/bin/chromedriver", port=0,
- options=None, service_args=None,
- desired_capabilities=None, service_log_path=None,
- chrome_options=None, keep_alive=True):
diff --git a/xpi-path.patch b/xpi-path.patch
deleted file mode 100644
index b4059f8..0000000
--- a/xpi-path.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/selenium/webdriver/firefox/firefox_profile.py b/selenium/webdriver/firefox/firefox_profile.py
-index 6f8293d..3dae348 100644
---- a/selenium/webdriver/firefox/firefox_profile.py
-+++ b/selenium/webdriver/firefox/firefox_profile.py
-@@ -37,7 +37,7 @@ from selenium.webdriver.common.proxy import ProxyType
- from selenium.common.exceptions import WebDriverException
-
-
--WEBDRIVER_EXT = "webdriver.xpi"
-+WEBDRIVER_EXT = "/usr/share/firefoxdriver/webdriver.xpi"
- WEBDRIVER_PREFERENCES = "webdriver_prefs.json"
- EXTENSION_NAME = "fxdriver at googlecode.com"
-
-@@ -246,9 +246,6 @@ class FirefoxProfile(object):
- - path: url, absolute path to .xpi, or directory of addons
- - unpack: whether to unpack unless specified otherwise in the install.rdf
- """
-- if addon == WEBDRIVER_EXT:
-- addon = os.path.join(os.path.dirname(__file__), WEBDRIVER_EXT)
--
- tmpdir = None
- xpifile = None
- if addon.endswith('.xpi'):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-selenium.git/commitdiff/a03728482113bb9925acd7b543ed8ddfdc11ee2a
More information about the pld-cvs-commit
mailing list