diff --git a/c5f1db976c.patch b/c5f1db976c.patch new file mode 100644 index 0000000..dc48412 --- /dev/null +++ b/c5f1db976c.patch @@ -0,0 +1,24 @@ +From c5f1db976c89074e5f18f15b04cfa21132161a73 Mon Sep 17 00:00:00 2001 +From: Thomas Grainger +Date: Wed, 16 Mar 2022 20:10:30 +0000 +Subject: [PATCH] allow prerelease versions in marker evaluation (#523) + +Fixes #522 +--- + packaging/markers.py | 2 +- + tests/test_markers.py | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_vendor/packaging/markers.py b/src/pip/_vendor/packaging/markers.py +index 56d4b240..39905148 100644 +--- a/src/pip/_vendor/packaging/markers.py ++++ b/src/pip/_vendor/packaging/markers.py +@@ -192,7 +192,7 @@ def _eval_op(lhs: str, op: Op, rhs: str) -> bool: + except InvalidSpecifier: + pass + else: +- return spec.contains(lhs) ++ return spec.contains(lhs, prereleases=True) + + oper: Optional[Operator] = _operators.get(op.serialize()) + if oper is None: diff --git a/python-pip.spec b/python-pip.spec index 452ec3d..0f48902 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -82,6 +82,12 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Allow prerelease versions in marker evaluation (from packaging 22+) +# i.e. make 3.7.0 < 3.13.0rc3 in python_full_version marker +# https://github.com/pypa/packaging/commit/c5f1db976c +# Manually edited to apply to src/pip/_vendor/packaging +Patch: c5f1db976c.patch + %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index