install.python-poetry.org icon indicating copy to clipboard operation
install.python-poetry.org copied to clipboard

install-poetry.py fails to install poetry from tarball (using --path)

Open 1ace opened this issue 4 years ago • 1 comments

  • [x] I am on the latest Poetry version.

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Docker image python:3.7-slim

  • Poetry version: N/A

  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

To reproduce the environment exactly, everything below should be run within this docker container:

docker run --rm -it python:3.7-slim bash

On top of that, the following needs to be run within the docker container, before the 3 cases described below:

POETRY_VERSION=1.1.7
curl -LO https://github.com/python-poetry/poetry/releases/download/$POETRY_VERSION/poetry-$POETRY_VERSION-linux.tar.gz

Now, this works (old get-poetry.py install script, passing --file):

curl -s https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | \
  python - --file poetry-$POETRY_VERSION-linux.tar.gz

And so does this (new install-poetry.py install script, passing --version):

curl -s https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | \
  python - --version $POETRY_VERSION

But this (new install script, passing --path) claims to successfully install poetry, but actually installs an empty venv, without poetry:

curl -s https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | \
  python - --path poetry-$POETRY_VERSION-linux.tar.gz

I make use of --path so that I can cache the tarball between docker builds & CI executions, so I'll have to stay on the deprecated get-poetry.py script for now :upside_down_face:

1ace avatar Jun 28 '21 13:06 1ace

Ah, I just noticed that the 1.2.0a1 tarball has also had its size divided by ~100 compared to 1.1.7, which means caching it is not as necessary as it was until now.

This unblocks me, as I still can't update to the new install-poetry.py for now, but I will once 1.2.0 is out, doing both upgrades at the same time :+1:

In the meantime, it might be worth removing the --path option until it is fixed, so that people don't try to use a broken feature?

1ace avatar Jul 12 '21 15:07 1ace