From 94722ee26db4828464bb8a9d22d4827f2af6ec70 Mon Sep 17 00:00:00 2001 From: Adam Roses Wight Date: Mon, 4 Dec 2017 21:41:21 -0500 Subject: [PATCH] Include optional Redis support as an "extra" This makes it easy to install the optional libraries. Bug: T181850 --- README.md | 5 +++-- setup.py | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71259982..b9697352 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ ORES is based on Python 3. Use pip to install ORES: ``pip install ores`` (or ``pip3 install ores`` if your distribution defaults to Python 2) -If you're running with the default configuration, you'll need to install a few more optional libraries, +If you're running with the default Redis configuration, you'll need to install a few more optional libraries, -``pip install pylru`` +``pip install ores[redis]`` Then you can easily run a test server by: @@ -53,3 +53,4 @@ Authors * [Yuvi Panda](https://github.com/yuvipanda) * [Amir Sarabadani](https://github.com/Ladsgroup) * [Justin Du](https://github.com/mdew192837) +* [Adam Wight](https://github.com/adamwight) diff --git a/setup.py b/setup.py index 48ac7f73..438026cd 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,14 @@ def requirements(fname): include_package_data=True, long_description=read('README.md'), install_requires=list(requirements("requirements.txt")), + extras_require={ + # Install ores[redis] if your deployment will use the Redis scoring + # cache and Celery backend. + "redis": [ + "pylru", + "redis", + ], + }, classifiers=[ "Development Status :: 3 - Alpha", "Programming Language :: Python",