#!/usr/bin/env python
from setuptools import find_packages, setup

import redis

setup(
    name="redis",
    description="Python client for Redis database and key-value store",
    long_description=open("README.md").read().strip(),
    long_description_content_type="text/markdown",
    keywords=["Redis", "key-value store", "database"],
    license="MIT",
    version=redis.__version__,
    packages=find_packages(
        include=[
            "redis",
            "redis.commands",
            "redis.commands.bf",
            "redis.commands.json",
            "redis.commands.search",
            "redis.commands.timeseries",
            "redis.commands.graph",
        ]
    ),
    url="https://github.com/redis/redis-py",
    author="Redis Inc.",
    author_email="oss@redis.com",
    python_requires=">=3.6",
    install_requires=[
        "deprecated==1.2.3",
        "packaging==21.3",
    ],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
    ],
    extras_require={
        "hiredis": ["hiredis>=1.0.0"],
    },
)

setup.py
#!/usr/bin/env python
from setuptools import find_packages, setup

import redis

setup(
    name="redis",
    description="Python client for Redis database and key-value store",
    long_description=open("README.md").read().strip(),
    long_description_content_type="text/markdown",
    keywords=["Redis", "key-value store", "database"],
    license="MIT",
    version=redis.__version__,
    packages=find_packages(
        include=[
            "redis",
            "redis.commands",
            "redis.commands.bf",
            "redis.commands.json",
            "redis.commands.search",
            "redis.commands.timeseries",
            "redis.commands.graph",
        ]
    ),
    url="https://github.com/redis/redis-py",
    author="Redis Inc.",
    author_email="oss@redis.com",
    python_requires=">=3.6",
    setup_requires=[
        "packaging>=21.3",
    ],
    install_requires=[
        "deprecated>=1.2.3",
        "packaging>=21.3",
    ],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
    ],
    extras_require={
        "hiredis": ["hiredis>=1.0.0"],
    },
)

setup.py
diff --git a/setup.py b/setup.py
index 58d753fb3a..b9c2e3e315 100644
--- a/setup.py
+++ b/setup.py
@@ -26,9 +26,12 @@
     author="Redis Inc.",
     author_email="oss@redis.com",
     python_requires=">=3.6",
+    setup_requires=[
+        "packaging>=21.3",
+    ],
     install_requires=[
-        "deprecated==1.2.3",
-        "packaging==21.3",
+        "deprecated>=1.2.3",
+        "packaging>=21.3",
     ],
     classifiers=[
         "Development Status :: 5 - Production/Stable",

Module installation fails due to missing dependency
https://github.com/redis/redis-py/blob/039488d97ec545b37e903d1b791a88bac8f77973/redis/connection.py#L1
the deprecated distutils was replaced with the packaging module as part of release v4.0.0b1
packaging is not a builtin python module but was not added to setup.py as a dependency which causes applications that require redis-py to fail if packaging isn't already installed on the machine.
the packaging module should probably be added as a dependency in setup.py to resolve this
