From 3487452483cc9611e0c84811fffca428ff5cb04b Mon Sep 17 00:00:00 2001 From: Giulio Calacoci Date: Thu, 4 Jul 2024 15:38:14 +0200 Subject: [PATCH] Require cramjam lib to be >= 2.7.0 for python >= 3.6 From version 0.7.0 the library `python-snappy` has been re-written to use internally uses the `cramjam` library. This new version of `python-snappy` doesn't work well with versions of `cramjam` < 2.7.0 as the structure of the code is different than the one used in the new version. Also for python < 3.7 new `cramjam` libs ( >= 2.7.0) are not available. So we pinned `python-snappy` to 0.6.1 for python < 3.7, as this old version is compatible with the `cramjam` library with versions < 2.7.0 and set to use the newer versions of the `python-snappy` and `cramjam` libs for python >= 3.7 . References: bar-156 Signed-off-by: Giulio Calacoci --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2189a1780..0da075f07 100755 --- a/setup.py +++ b/setup.py @@ -111,7 +111,11 @@ "grpcio", "google-cloud-compute", # requires minimum python3.7 ], - "snappy": ["python-snappy==0.6.1"], + "snappy": [ + 'python-snappy==0.6.1; python_version<"3.7"', + 'python-snappy; python_version>="3.7"', + 'cramjam >= 2.7.0; python_version>="3.7"', + ], }, platforms=["Linux", "Mac OS X"], classifiers=[