From e28ae15e363d17ae7f3fef67633c8c797c1d2a65 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 3 Nov 2023 11:23:34 +1300 Subject: [PATCH] pdm: Remove universal wheel file name test It was broken by changes in pyproject.nix and doesn't seem to be in use anyway. --- modules/dream2nix/WIP-python-pdm/lib.nix | 12 ------------ tests/nix-unit/test_python-pdm-lib/default.nix | 17 +---------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/modules/dream2nix/WIP-python-pdm/lib.nix b/modules/dream2nix/WIP-python-pdm/lib.nix index 30f7fab6..d64f2dde 100644 --- a/modules/dream2nix/WIP-python-pdm/lib.nix +++ b/modules/dream2nix/WIP-python-pdm/lib.nix @@ -70,18 +70,6 @@ in is_valid; - # matchUniversalWheelFileName = lib.match "([^-]+)-([^-]+)(-([[:digit:]][^-]*))?-([^-]+)-([^-]+)-(.+).[tar.gz|zip]"; - # name: matchUniversalWheelFileName name != null; - - isValidUniversalWheelFilename = {filename}: let - parsed_filename = libpyproject.pypa.parseWheelFileName filename; - is_valid = - (parsed_filename.languageTag == "py3") - && (parsed_filename.abiTag == "none") - && (parsed_filename.platformTags == ["any"]); - in - is_valid; - # Check that the given filename is a valid wheel for our environment. isUsableWheelFilename = { environ, diff --git a/tests/nix-unit/test_python-pdm-lib/default.nix b/tests/nix-unit/test_python-pdm-lib/default.nix index ba9b3178..d17364c1 100644 --- a/tests/nix-unit/test_python-pdm-lib/default.nix +++ b/tests/nix-unit/test_python-pdm-lib/default.nix @@ -51,21 +51,6 @@ }; }; - tests_isValidUniversalWheel = let - testIsValidUniversalWheelFilename = filename: - libpdm.isValidUniversalWheelFilename {inherit filename;}; - in { - test_isValidUniversalWheelFilename__wheel_universal = { - expr = testIsValidUniversalWheelFilename "certifi-2023.7.22-py3-none-any.whl"; - expected = true; - }; - - test_isValidUniversalWheelFilename__wheel_not_universal = { - expr = testIsValidUniversalWheelFilename "certifi-2023.7.22-py3-abi3-any.whl"; - expected = false; - }; - }; - tests_selectExtension = let names = [ "certifi-2023.7.22-py3-abi3-any.whl" @@ -306,4 +291,4 @@ }; }; in - test_isDependencyRequired // tests_isUsableFilename // tests_isValidUniversalWheel // tests_selectExtension // tests_selectSdist // tests_preferWheelSelector // tests_preferSdistSelector // tests_parseLockData // tests_groupsWithDeps // tests_getDepsRecursively // tests_selectForGroups + test_isDependencyRequired // tests_isUsableFilename // tests_selectExtension // tests_selectSdist // tests_preferWheelSelector // tests_preferSdistSelector // tests_parseLockData // tests_groupsWithDeps // tests_getDepsRecursively // tests_selectForGroups