Skip to content

Commit

Permalink
[build]: Fix sonic-cfggen contextlib err (sonic-net#7996)
Browse files Browse the repository at this point in the history
A recent version of contextlib2 (https://pypi.org/project/contextlib2/21.6.0/#history) has broken Python2 compatibility,
so the version picked up by netaddr when using Python2 must be specified, or else builds fail

Co-authored-by: Tom Zhu <[email protected]>
  • Loading branch information
2 people authored and lguohan committed Jun 29, 2021
1 parent c301877 commit 1d3e7ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dockers/docker-sonic-mgmt/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y build-essential \

RUN pip install cffi==1.10.0 \
"cryptography>=2.5" \
contextlib2==0.6.0.post1 \
"future>=0.16.0" \
gitpython \
ipaddr \
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-config-engine/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
'Jinja2<3.0.0',
'pyangbind==0.6.0',
'zipp==1.2.0', # importlib-resources needs zipp and seems to have a bug where it will try to install too new of a version for Python 2
'importlib-resources==3.3.1' # importlib-resources v4.0.0 was released 2020-12-23 and drops support for Python 2
'importlib-resources==3.3.1', # importlib-resources v4.0.0 was released 2020-12-23 and drops support for Python 2
'contextlib2==0.6.0.post1'
]


Expand Down

0 comments on commit 1d3e7ab

Please sign in to comment.