-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Module installation fails due to missing dependency #1625
Comments
Thanks for pointing this out. This definitely snuck in, as it's a package that's default distutils-ed on several OSes (including all 3 of mine), so I didn't notice. |
Fixed in #1626 . Closing. |
Happy to help :) However the merged fix seems counter productive since distutils is considered deprecated and is scheduled for removal from the python standard library in python 3.12 (which i think was the reason for the original change) |
Please re-open, pull request #1626 did not fix this issue (and is indeed a step backwards), # cd "$(mktemp -d)"
# git clone --depth 1 https://github.com/andymccurdy/redis-py
# cd redis-py/
# virtualenv --python=python3.9 venv
# source venv/bin/activate
# pip install .
Processing /tmp/tmp.YtqtDgr1Ry/redis-py
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /tmp/tmp.YtqtDgr1Ry/redis-py/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/tmp.YtqtDgr1Ry/redis-py/setup.py'"'"'; __file__='"'"'/tmp/tmp.YtqtDgr1Ry/redis-py/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9ygcp0w4
cwd: /tmp/tmp.YtqtDgr1Ry/redis-py/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/tmp.YtqtDgr1Ry/redis-py/setup.py", line 4, in <module>
import redis
File "/tmp/tmp.YtqtDgr1Ry/redis-py/redis/__init__.py", line 1, in <module>
from redis.client import Redis, StrictRedis
File "/tmp/tmp.YtqtDgr1Ry/redis-py/redis/client.py", line 15, in <module>
from redis.connection import ConnectionPool, SSLConnection, UnixDomainSocketConnection
File "/tmp/tmp.YtqtDgr1Ry/redis-py/redis/connection.py", line 13, in <module>
from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
----------------------------------------
WARNING: Discarding file:///tmp/tmp.YtqtDgr1Ry/redis-py. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. I believe the issue is that The # git --no-pager diff
diff --git a/setup.py b/setup.py
index 58d753f..b9c2e3e 100644
--- a/setup.py
+++ b/setup.py
@@ -26,9 +26,12 @@ setup(
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", I will try turn that into a pull request in a minute. |
Hi @hartwork I have been following this issue and trying to reproduce this issue while I'm on #1781 Strangely, I am able to reproduce the issue even after #1780 is merged. Here are the steps I did:
Am I missing something here? I am new to the internals of |
@ashwani99 that's a limitation of |
@hartwork Thanks, that helped. From
So ideally, https://github.com/redis/redis-py/pull/1780/files should have fixed it. Looks like the setup is failing due to
Line 4 in 12c17bf
Creating a separate issue for this. |
redis-py/redis/connection.py
Line 1 in 039488d
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
The text was updated successfully, but these errors were encountered: