Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hiredis dependency on supported platforms #20437

Merged
merged 5 commits into from
Nov 17, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import logging
import os
import platform
import re
import shutil
import subprocess
Expand Down Expand Up @@ -264,9 +265,16 @@ def get_packages(self):
"numpy >= 1.19.3; python_version >= '3.9'",
"protobuf >= 3.15.3",
"pyyaml",
"redis >= 3.5.0, < 4.0.0",
]

if platform.system() == "Darwin" and platform.machine() == "arm64":
# TODO (Alex): `hiredis` doesn't have prebuilt M1 mac wheels yet. We can
# remove this, either when they add support, we remove redis, or we vendor
# redis/hiredis ourselves.
setup_spec.install_requires.append("redis >= 3.5.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment as to why?

else:
setup_spec.install_requires.append("redis[hiredis] >= 3.5.0")


def is_native_windows_or_msys():
"""Check to see if we are running on native Windows,
Expand Down