From 997443e7548b7a30a632f66b3597979a0a4c5da8 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Tue, 14 Jan 2020 11:20:50 -0500 Subject: [PATCH] Constrain more-itertools for build failure A recent update to the more-itertools python module causes a failure in the STX_BUILD_container_setup CENGN build job. This module dropped python-2.7 support after its 5.0.0 release. The newest update causes a failure due to code that does not work with 2.7. This commit adds a builder-constraints.txt file that the Dockerfile passes to the pip install command to constrain module versions during setup of the build container, allowing us to constrain the more-itertools version to 5.0.0, the last version to officially support python 2.7. Change-Id: I3432c204ecd7c4ddedd8a7dea14216d4ec31e0aa Closes-Bug: 1859642 Signed-off-by: Don Penney (cherry picked from commit 12c3dc47720bc8d011a746faf42b824caac8faa6) --- Dockerfile | 5 +++-- toCOPY/builder-constraints.txt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 toCOPY/builder-constraints.txt diff --git a/Dockerfile b/Dockerfile index a2687a12..c8d40cca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,6 +106,7 @@ COPY toCOPY/populate_downloads.sh /usr/local/bin COPY toCOPY/generate-cgcs-tis-repo /usr/local/bin COPY toCOPY/generate-cgcs-centos-repo.sh /usr/local/bin COPY toCOPY/.inputrc /home/$MYUNAME/ +COPY toCOPY/builder-constraints.txt /home/$MYUNAME/ # cpan modules, installing with cpanminus to avoid stupid questions since cpan is whack RUN cpanm --notest Fatal && \ @@ -115,8 +116,8 @@ RUN cpanm --notest Fatal && \ cpanm --notest XML::Simple # pip installs -RUN pip install python-subunit junitxml --upgrade && \ - pip install tox --upgrade +RUN pip install -c /home/$MYUNAME/builder-constraints.txt python-subunit junitxml --upgrade && \ + pip install -c /home/$MYUNAME/builder-constraints.txt tox --upgrade # Install repo tool RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo && \ diff --git a/toCOPY/builder-constraints.txt b/toCOPY/builder-constraints.txt new file mode 100644 index 00000000..04c829e9 --- /dev/null +++ b/toCOPY/builder-constraints.txt @@ -0,0 +1,2 @@ +more-itertools===5.0.0;python_version=='2.7' # Last version with official 2.7 support +