From 5b0fbb173654f35682393088a3d50f53dd366a39 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Thu, 22 Jun 2023 14:47:59 +0000 Subject: [PATCH 1/3] feat: adds vi and nox to the python-multi docker file --- python/googleapis/python-multi/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/googleapis/python-multi/Dockerfile b/python/googleapis/python-multi/Dockerfile index f85ef4c1..b2612f0d 100644 --- a/python/googleapis/python-multi/Dockerfile +++ b/python/googleapis/python-multi/Dockerfile @@ -61,6 +61,7 @@ RUN apt-get update \ tk \ tk-dev \ uuid-dev \ + vi \ wget \ zlib1g-dev \ && apt-get clean autoclean \ @@ -185,6 +186,9 @@ ENV PATH /venv/bin:$PATH # will want it. RUN pip install --no-cache-dir virtualenv +# Install "nox", to enable troubleshooting of package installations +RUN pip install --no-cache-dir nox + # Setup Cloud SDK ENV CLOUD_SDK_VERSION 420.0.0 # Use system python for cloud sdk. From 2d4b1b5b817930d530cb2283902bdcececa1235f Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Thu, 22 Jun 2023 15:21:37 +0000 Subject: [PATCH 2/3] revises vi to vim --- python/googleapis/python-multi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/googleapis/python-multi/Dockerfile b/python/googleapis/python-multi/Dockerfile index b2612f0d..b7253c7e 100644 --- a/python/googleapis/python-multi/Dockerfile +++ b/python/googleapis/python-multi/Dockerfile @@ -61,7 +61,7 @@ RUN apt-get update \ tk \ tk-dev \ uuid-dev \ - vi \ + vim \ wget \ zlib1g-dev \ && apt-get clean autoclean \ From 6aa70a0a4f4eaac860c0fa91d82bb325627cf1b0 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Thu, 22 Jun 2023 19:01:39 +0000 Subject: [PATCH 3/3] adds ability to process requirements files --- python/googleapis/python-multi/Dockerfile | 9 +---- .../googleapis/python-multi/requirements.in | 2 + .../googleapis/python-multi/requirements.txt | 40 +++++++++++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 python/googleapis/python-multi/requirements.in create mode 100644 python/googleapis/python-multi/requirements.txt diff --git a/python/googleapis/python-multi/Dockerfile b/python/googleapis/python-multi/Dockerfile index b7253c7e..5a9e3cc3 100644 --- a/python/googleapis/python-multi/Dockerfile +++ b/python/googleapis/python-multi/Dockerfile @@ -152,7 +152,6 @@ ENV PYTHON_PIP_VERSION 21.3.1 RUN wget --no-check-certificate -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ && python3.10 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ - # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 @@ -182,12 +181,8 @@ RUN python3.11 -m pip RUN python3.9 -m venv /venv ENV PATH /venv/bin:$PATH -# Install "virtualenv", since the vast majority of users of this image -# will want it. -RUN pip install --no-cache-dir virtualenv - -# Install "nox", to enable troubleshooting of package installations -RUN pip install --no-cache-dir nox +COPY requirements.txt /requirements.txt +RUN pip install --require-hashes --no-cache-dir -r /requirements.txt # Setup Cloud SDK ENV CLOUD_SDK_VERSION 420.0.0 diff --git a/python/googleapis/python-multi/requirements.in b/python/googleapis/python-multi/requirements.in new file mode 100644 index 00000000..be14f93f --- /dev/null +++ b/python/googleapis/python-multi/requirements.in @@ -0,0 +1,2 @@ +virtualenv +nox \ No newline at end of file diff --git a/python/googleapis/python-multi/requirements.txt b/python/googleapis/python-multi/requirements.txt new file mode 100644 index 00000000..ea712374 --- /dev/null +++ b/python/googleapis/python-multi/requirements.txt @@ -0,0 +1,40 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --generate-hashes requirements.in +# +argcomplete==3.1.1 \ + --hash=sha256:35fa893a88deea85ea7b20d241100e64516d6af6d7b0ae2bed1d263d26f70948 \ + --hash=sha256:6c4c563f14f01440aaffa3eae13441c5db2357b5eec639abe7c0b15334627dff + # via nox +colorlog==6.7.0 \ + --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ + --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 + # via nox +distlib==0.3.6 \ + --hash=sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46 \ + --hash=sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e + # via virtualenv +filelock==3.12.2 \ + --hash=sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81 \ + --hash=sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec + # via virtualenv +nox==2023.4.22 \ + --hash=sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891 \ + --hash=sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f + # via -r requirements.in +packaging==23.1 \ + --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ + --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f + # via nox +platformdirs==3.7.0 \ + --hash=sha256:87fbf6473e87c078d536980ba970a472422e94f17b752cfad17024c18876d481 \ + --hash=sha256:cfd065ba43133ff103ab3bd10aecb095c2a0035fcd1f07217c9376900d94ba07 + # via virtualenv +virtualenv==20.23.1 \ + --hash=sha256:34da10f14fea9be20e0fd7f04aba9732f84e593dac291b757ce42e3368a39419 \ + --hash=sha256:8ff19a38c1021c742148edc4f81cb43d7f8c6816d2ede2ab72af5b84c749ade1 + # via + # -r requirements.in + # nox