-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[build] Use pip to install setup.py dependency instead of python setup.py install
#8997
Conversation
@qiluo-msft , we need to add the labels, right? |
In my opinion, it is better to restrict the required version of redis of redis-dump-load module.
|
The problem is that redis client v4 will drop support for Python2 (see redis/redis-py#1318)
|
b12e7b0
to
99fbb6d
Compare
@saiarcot895 I revert your fix and redo the fix. Could you please help review? |
@@ -643,6 +643,8 @@ $(addprefix $(PYTHON_WHEELS_PATH)/, $(SONIC_PYTHON_WHEELS)) : $(PYTHON_WHEELS_PA | |||
pushd $($*_SRC_PATH) $(LOG_SIMPLE) | |||
# apply series of patches if exist | |||
if [ -f ../$(notdir $($*_SRC_PATH)).patch/series ]; then QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; fi | |||
# Use pip instead of later setup.py to install dependencies into user home, but uninstall self | |||
pip$($*_PYTHON_VERSION) install . && pip$($*_PYTHON_VERSION) uninstall --yes `python setup.py --name` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does pip
read the requirements.txt
file by default for getting the list of packages to install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you mentioned is pip -r requirements.txt
. And pip install .
is checking the setup.py for dependencies, install them and also the package itself.
…up.py install` (#8997) Fix a recent build error introduced by a pre-release redis-py. This is a general issue because `python setup.py install` (ie `easy_instal`) does not ignore pre-release versions. The fix is suggested by pypa/setuptools#855 (comment)
…up.py install` (sonic-net#9111) #### Why I did it Backport sonic-net#8997 to 202012 branch.
SHA-1: 798910a * [build] Use pip to install setup.py dependency instead of `python setup.py install` (sonic-net#9111) #### Why I did it Backport sonic-net#8997 to 202012 branch.
Why I did it
Fix a recent build error introduced by a pre-release redis-py. This is a general issue because
python setup.py install
(ieeasy_instal
) does not ignore pre-release versions. The fix is suggested by pypa/setuptools#855 (comment)How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)