pytest: Update requirements to match sphinx versions
PATCH v2 1/2 pytest: Update requirements to match sphinx versions
In order to better make use of pip caches, and also for better overall consistency, we should use the same versions of packages in each of our python requirements files. Update pytest to use the newer versions of packages we use in sphinx builds.
---
Changes in v2:
- Don't forget to send this patch, this time.
--- test/py/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
test/py/requirements.txt +4 -4
@@ -8,21 +8,21 @@ fixtures==3.0.0 importlib-metadata==0.23 linecache2==1.0.0 more-itertools==7.2.0 -packaging==19.2 +packaging==21.3 pbr==5.4.3 pluggy==0.13.0 py==1.10.0 pycryptodomex==3.9.8 pyelftools==0.27 pygit2==1.9.2 -pyparsing==2.4.2 +pyparsing==3.0.7 pytest==6.2.5 pytest-xdist==2.5.0 python-mimeparse==1.6.0 python-subunit==1.3.0 -requests==2.25.1 +requests==2.27.1 setuptools==58.3.0 -six==1.12.0 +six==1.16.0 testtools==2.3.0 traceback2==1.4.0 unittest2==1.1.0
Signature · 1 line
2.34.1
PATCH v2 2/2 Dockerfile: Populate a pip cache
Given the number of jobs in CI we have which use python and pip install packages, we should do this once in the Dockerfile, in order to populate the cache. We let each job continue to create and use the virtual environments they need to facilitate making updates to these environments easier.
---
Changes in v2:
- Comment on why we wget
- Drop commented out portion
--- tools/docker/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+)
tools/docker/Dockerfile +11 -0
@@ -265,6 +265,17 @@ RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot RUN useradd -m -U uboot USER uboot:uboot +# Populate the cache for pip to use. Get these via wget as the +# COPY / ADD directives don't work as we need them to. +RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt +RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt +RUN virtualenv -p /usr/bin/python3 /tmp/venv && \ + . /tmp/venv/bin/activate && \ + pip install -r /tmp/pytest-requirements.txt \ + -r /tmp/sphinx-requirements.txt && \ + deactivate && \ + rm -rf /tmp/venv /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt + # Create the buildman config file RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman
Signature · 1 line
2.34.1
Re: [v2 2/2] Dockerfile: Populate a pip cache
Quoted 7 lines · Tom Rini
Given the number of jobs in CI we have which use python and pip install packages, we should do this once in the Dockerfile, in order to populate the cache. We let each job continue to create and use the virtual environments they need to facilitate making updates to these environments easier.
Quoted 9 lines
Signed-off-by Tom Rini <[email protected]>---
Changes in v2:
- Comment on why we wget
- Drop commented out portion--- tools/docker/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+)
Re: [v2 2/2] Dockerfile: Populate a pip cache
In reply to Tom RiniQuoted 8 lines · Tom Rini
Given the number of jobs in CI we have which use python and pip install packages, we should do this once in the Dockerfile, in order to populate the cache. We let each job continue to create and use the virtual environments they need to facilitate making updates to these environments easier.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
With a locally done and then undone kludge to work around that this requires the first patch to be applied and pushed already, applied to u-boot/master, thanks!
Signature · 1 line
Tom
Quoted 6 lines · Tom Rini
In order to better make use of pip caches, and also for better overall consistency, we should use the same versions of packages in each of our python requirements files. Update pytest to use the newer versions of packages we use in sphinx builds.
Quoted 7 lines
Signed-off-by Tom Rini <[email protected]>---
Changes in v2:
- Don't forget to send this patch, this time.--- test/py/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Quoted 7 lines · Tom Rini
In order to better make use of pip caches, and also for better overall consistency, we should use the same versions of packages in each of our python requirements files. Update pytest to use the newer versions of packages we use in sphinx builds.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom