From 3e2a70dc5d12bff649eadd8862481592b84c1329 Mon Sep 17 00:00:00 2001 From: maddieford <93676569+maddieford@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:04:38 -0800 Subject: [PATCH] Fix install_requires list syntax (#3263) (#3268) (cherry picked from commit a6e735ed7071099efd0b67d0a02069cd65bbad23) --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 0bb053d4c2..e83f598934 100755 --- a/setup.py +++ b/setup.py @@ -320,10 +320,11 @@ def run(self): # will be removed from Python 3. # * In version 3.13 of Python, the crypt module was removed and legacycrypt is # required instead. -requires = [ - "distro;python_version>='3.8'", - "legacycrypt;python_version>='3.13'", -] +requires = [] +if sys.version_info[0] >= 3 and sys.version_info[1] >= 8: + requires.append('distro') +if sys.version_info[0] >= 3 and sys.version_info[1] >= 13: + requires.append('legacycrypt') modules = [] # pylint: disable=invalid-name