Skip to content

Commit 2afd4c0

Browse files
author
sonic
committed
[cfggen]: Fix build by fixing pyangbind version (sonic-net#1633)
1 parent 7a9120e commit 2afd4c0

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

sonic-slave/Dockerfile

+10-6
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ RUN apt-get update && apt-get install -y \
189189
libjs-sphinxdoc \
190190
libjs-underscore \
191191
python-docutils \
192-
python-jinja2 \
193192
python-markupsafe \
194193
python-pygments \
195194
python-roman \
@@ -198,7 +197,6 @@ RUN apt-get update && apt-get install -y \
198197
python3-sphinx \
199198
# For sonic config engine testing
200199
python-lxml \
201-
python-jinja2 \
202200
python-netaddr \
203201
python-ipaddr \
204202
python-yaml \
@@ -234,16 +232,22 @@ RUN export VERSION=1.8.3 \
234232
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
235233
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
236234

235+
# Upgrade pip2
236+
# Note: use pip2 specific version so jinja2 2.10 will install
237+
RUN python2 -m pip install -U pip==9.0.3
238+
237239
# For p4 build
238240
RUN pip install \
239241
ctypesgen \
240242
crc16
241243

242-
# For templating
243-
RUN pip install j2cli
244-
245244
# For sonic config engine testing
246-
RUN pip install pyangbind==0.5.10
245+
RUN pip install pyangbind==0.6.0
246+
# Note: force upgrade debian packaged jinja2, if installed
247+
RUN pip install --force-reinstall --upgrade jinja2>=2.10
248+
249+
# For templating (requiring jinja2)
250+
RUN pip install j2cli
247251

248252
# For sonic utilities testing
249253
RUN pip install click-default-group click natsort tabulate

src/sonic-config-engine/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ def get_test_suite():
1717
url='https://github.com/Azure/sonic-buildimage',
1818
py_modules=['portconfig', 'minigraph', 'openconfig_acl', 'sonic_platform'],
1919
scripts=['sonic-cfggen'],
20-
install_requires=['lxml', 'jinja2', 'netaddr', 'ipaddr', 'pyyaml', 'pyangbind'],
20+
install_requires=['lxml', 'jinja2>=2.10', 'netaddr', 'ipaddr', 'pyyaml', 'pyangbind==0.6.0'],
2121
test_suite='setup.get_test_suite',
2222
)

0 commit comments

Comments
 (0)