From 9ae46ee070d064da4fb935674b5740514d459593 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 5 Jan 2025 22:26:37 +0100 Subject: [PATCH] python313Packages.selenium: 4.25.0 -> 4.27.1 --- .../python-modules/selenium/default.nix | 13 ++-- .../dont-build-the-selenium-manager.patch | 74 ++++++++++++------- 2 files changed, 54 insertions(+), 33 deletions(-) diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index dc5b0433fa52..c596ec3b40c6 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, buildPythonPackage, selenium-manager, + setuptools, certifi, pytestCheckHook, pythonOlder, @@ -19,8 +20,8 @@ buildPythonPackage rec { pname = "selenium"; - version = "4.25.0"; - format = "setuptools"; + version = "4.27.1"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -28,8 +29,8 @@ buildPythonPackage rec { owner = "SeleniumHQ"; repo = "selenium"; # check if there is a newer tag with or without -python suffix - tag = "selenium-${version}"; - hash = "sha256-ykZdL2Rn+bU8do3e9zf9pJtInBNRGLcXi5pD1vm7OJY="; + tag = "selenium-${version}-python"; + hash = "sha256-XpTfZCERA2SmLOj6dcERVJ47K0gFhdXMTl9VCeE6eD8="; }; patches = [ ./dont-build-the-selenium-manager.patch ]; @@ -58,7 +59,9 @@ buildPythonPackage rec { ln -s ${lib.getExe selenium-manager} $DST_PREFIX/common/linux/ ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ certifi trio trio-websocket diff --git a/pkgs/development/python-modules/selenium/dont-build-the-selenium-manager.patch b/pkgs/development/python-modules/selenium/dont-build-the-selenium-manager.patch index 51db7aaf0e19..4654e00b4919 100644 --- a/pkgs/development/python-modules/selenium/dont-build-the-selenium-manager.patch +++ b/pkgs/development/python-modules/selenium/dont-build-the-selenium-manager.patch @@ -1,37 +1,55 @@ -From e52d75248a5d18bcf965591eb240a11a23147634 Mon Sep 17 00:00:00 2001 -From: Pavel Sobolev -Date: Sat, 3 Aug 2024 22:38:49 +0300 -Subject: [PATCH] Don't build the Selenium Manager. - ---- - py/setup.py | 7 ------- - 1 file changed, 7 deletions(-) - +diff --git a/py/pyproject.toml b/py/pyproject.toml +index e99a03cd5d..1061adbdf5 100644 +--- a/py/pyproject.toml ++++ b/py/pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools", "setuptools-rust"] ++requires = ["setuptools"] + build-backend = "setuptools.build_meta" + + [project] diff --git a/py/setup.py b/py/setup.py -index a71007f..fdda74e 100755 +deleted file mode 100755 +index 0f93e33f0e..0000000000 --- a/py/setup.py -+++ b/py/setup.py -@@ -19,7 +19,6 @@ from distutils.command.install import INSTALL_SCHEMES - from os.path import dirname, join, abspath - from setuptools import setup - from setuptools.command.install import install ++++ /dev/null +@@ -1,38 +0,0 @@ +-# Licensed to the Software Freedom Conservancy (SFC) under one +-# or more contributor license agreements. See the NOTICE file +-# distributed with this work for additional information +-# regarding copyright ownership. The SFC licenses this file +-# to you under the Apache License, Version 2.0 (the +-# "License"); you may not use this file except in compliance +-# with the License. You may obtain a copy of the License at +-# +-# http://www.apache.org/licenses/LICENSE-2.0 +-# +-# Unless required by applicable law or agreed to in writing, +-# software distributed under the License is distributed on an +-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-# KIND, either express or implied. See the License for the +-# specific language governing permissions and limitations +-# under the License. +- +-from distutils.command.install import INSTALL_SCHEMES +-from os.path import dirname, join, abspath +-from setuptools import setup +-from setuptools.command.install import install -from setuptools_rust import Binding, RustExtension - - - for scheme in INSTALL_SCHEMES.values(): -@@ -84,12 +83,6 @@ setup_args = { - "typing_extensions~=4.9", - "websocket-client~=1.8", - ], +- +- +-for scheme in INSTALL_SCHEMES.values(): +- scheme['data'] = scheme['purelib'] +- +-setup_args = { +- 'cmdclass': {'install': install}, - 'rust_extensions': [ - RustExtension( - {"selenium-manager": "selenium.webdriver.common.selenium-manager"}, - binding=Binding.Exec - ) - ], - 'zip_safe': False - } - --- -2.45.2 - +-} +- +-setup(**setup_args)