Skip to content

Commit

Permalink
[build] Use pip to install setup.py dependency instead of `python set…
Browse files Browse the repository at this point in the history
…up.py install` (#8997)

#### 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` (ie `easy_instal`) does not ignore pre-release versions. The fix is suggested by pypa/setuptools#855 (comment)
  • Loading branch information
qiluo-msft authored Oct 27, 2021
1 parent 4ad5f2a commit 4bda0a9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 28 deletions.
2 changes: 2 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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`
if [ ! "$($*_TEST)" = "n" ]; then python$($*_PYTHON_VERSION) setup.py test $(LOG); fi
python$($*_PYTHON_VERSION) setup.py bdist_wheel $(LOG)
# clean up
Expand Down
25 changes: 0 additions & 25 deletions src/redis-dump-load.patch/0003-use-redis-3.5.3.patch

This file was deleted.

1 change: 0 additions & 1 deletion src/redis-dump-load.patch/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
0001-Use-pipelines-when-dumping-52.patch
0002-Fix-setup.py-for-test-and-bdist_wheel.patch
0003-use-redis-3.5.3.patch
3 changes: 1 addition & 2 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
'./yang-models/sonic-tc-queue-map.yang',
'./yang-models/sonic-pfc-priority-queue-map.yang',
'./yang-models/sonic-pfc-priority-priority-group-map.yang',
'./yang-models/sonic-port-qos-map.yang',
'./yang-models/sonic_yang_tree']),
'./yang-models/sonic-port-qos-map.yang']),
],
zip_safe=False,
)

0 comments on commit 4bda0a9

Please sign in to comment.