[PATCH 1/6] pyenv: also install requirements for python2

Stephen Finucane stephen at that.guru
Wed Sep 18 19:45:50 AEST 2019


On Wed, 2019-09-18 at 16:17 +1000, Daniel Axtens wrote:
> The first time you do a migration with python3, you get a whole
> lot of seemingly null changes. This is a bit annoying so I use
> py2 to generate the changes. To do that, first fix the pyenv
> transition so requirements are still installed for python2.
> 
> Signed-off-by: Daniel Axtens <dja at axtens.net>

I assume we're not planning to do this work until Patchwork 2.3 or 3.0
(or whatever we decide to call it)? If so, I'd be inclined to just drop
support for Python 2.7 in this release and add null migration.

Stephen

> ---
>  tools/docker/Dockerfile | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
> index 35324b13c66a..78a97ffef9eb 100644
> --- a/tools/docker/Dockerfile
> +++ b/tools/docker/Dockerfile
> @@ -48,12 +48,21 @@ RUN pyenv latest install 2.7 && \
>      pyenv latest install 3.6 && \
>      pyenv latest install 3.7
>  
> -RUN pyenv global $(pyenv versions --bare | tac)
> +# old python 2.7
> +RUN pyenv global $(pyenv versions --bare)
>  
>  COPY requirements-*.txt /tmp/
>  RUN pip install tox tox-pyenv && \
>      pip install -r /tmp/requirements-dev.txt
>  
> +# most recent python
> +RUN pyenv global $(pyenv versions --bare | tac)
> +
> +RUN pip install tox tox-pyenv && \
> +    pip install -r /tmp/requirements-dev.txt
> +
> +
> +
>  # we deliberately leave the requirements files in tmp so we can
>  # ping the user in entrypoint.sh if the change them!
>  



More information about the Patchwork mailing list