From fa781b709177f30a8742940e7816778d6ceb5fb2 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Wed, 6 Nov 2024 15:33:23 -0800 Subject: [PATCH] Fixed the use_2to3 for setuptools >= 58 --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8e49bba..cd402dd 100755 --- a/setup.py +++ b/setup.py @@ -5,10 +5,13 @@ import sys +import setuptools from setuptools import setup +setuptools_major_version = int(setuptools.__version__.split('.')[0]) + extra_args = {} -if (sys.version_info[0] >= 3): +if (sys.version_info[0] >= 3) and setuptools_major_version < 58: extra_args['use_2to3'] = True setup(name='pybacktest',