You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/11/12 15:20:35 UTC

[libcloud] 01/09: Fix a bug in setup.py which causes installation to fail under Python 3.5 when installing from PyPi.

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch 3.4.x
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit dfa56739fa61c35060322c9cf680bb89cce219b6
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Thu Nov 11 21:42:51 2021 +0100

    Fix a bug in setup.py which causes installation to fail under Python 3.5
    when installing from PyPi.
---
 setup.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/setup.py b/setup.py
index 0f3ef37..31fa353 100644
--- a/setup.py
+++ b/setup.py
@@ -175,14 +175,10 @@ SUPPORTED_VERSIONS = ['PyPy 3', 'Python 3.5+']
 # Reference: https://hynek.me/articles/conditional-python-dependencies/
 # We rely on >= 2.26.0 to avoid issues with LGL transitive dependecy
 # See https://github.com/apache/libcloud/issues/1594 for more context
-INSTALL_REQUIREMENTS = []
-
-if sys.version_info < (3, 6, 0):
-    # requests 2.26.0 doesn't support Python 3.5 anymore
-    INSTALL_REQUIREMENTS.append('requests>=2.25.1')
-else:
-    INSTALL_REQUIREMENTS.append('requests>=2.26.0')
-
+INSTALL_REQUIREMENTS = [
+    'requests>=2.25.1; python_version <= "3.5"',
+    'requests>=2.26.0; python_version >= "3.6"'
+]
 
 setuptools_version = tuple(setuptools.__version__.split(".")[0:2])
 setuptools_version = tuple([int(c) for c in setuptools_version])