From e42bf4872d8dbdacf4018180a05b28422885b908 Mon Sep 17 00:00:00 2001 From: Sean Stewart Date: Thu, 18 Mar 2021 10:09:01 -0400 Subject: [PATCH] Make hiredis and optional dependency (resolves #917) --- CHANGES/917.feature | 1 + docs/getting-started.md | 9 +++------ setup.py | 6 ++++-- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 CHANGES/917.feature diff --git a/CHANGES/917.feature b/CHANGES/917.feature new file mode 100644 index 000000000..a2f069da8 --- /dev/null +++ b/CHANGES/917.feature @@ -0,0 +1 @@ +Make hiredis an optional dependency. diff --git a/docs/getting-started.md b/docs/getting-started.md index 46339a607..96933b904 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -6,15 +6,12 @@ pip install aioredis ``` -This will install `aioredis`, alongside `hiredis` and `async-timeout`. +This will install `aioredis`, `async-timeout`. -### Without Dependencies - -If you find yourself in a situation where you cannot support `hiredis` in your -application, you can install aioredis without that dependency: +### With hiredis ```shell -pip install --no-deps aioredis async-timeout +pip install aioredis[hiredis] ``` ### Installing from Git diff --git a/setup.py b/setup.py index ada0b1e80..2aba75c80 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def read_version(): setup( name="aioredis", version=read_version(), - description=("asyncio (PEP 3156) Redis support"), + description="asyncio (PEP 3156) Redis support", long_description="\n\n".join((read("README.md"), read("CHANGES.md"))), long_description_content_type="text/markdown", classifiers=classifiers, @@ -49,9 +49,11 @@ def read_version(): packages=find_packages(exclude=["tests"]), install_requires=[ "async-timeout", - 'hiredis>=1.0; implementation_name=="cpython"', "typing-extensions", ], + extras_require={ + "hiredis": 'hiredis>=1.0; implementation_name=="cpython"', + }, python_requires=">=3.6", include_package_data=True, )