From 431c335b47be548500c50bd631e30a66b4370788 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 17 May 2024 14:27:59 -0500 Subject: [PATCH] set symlinks to support precompiled pythons (#14) https://github.com/mise-plugins/mise-poetry/issues/9 --- .github/workflows/workflow.yml | 15 +++++++++------ bin/install | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cb3035b..610368e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,15 +20,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - uses: jdx/mise-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - cache: false + - run: | + curl mise.run | sh + echo 'export PATH=$HOME/.local/bin:$PATH' >> $GITHUB_ENV - run: mkdir -p ~/.local/share/mise/plugins - run: ln -s $PWD ~/.local/share/mise/plugins/poetry - - run: mise i poetry@latest + - run: mise i poetry@latest python + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: mise x poetry@latest -- poetry --version + - run: cat poetry-installer-error-*.log && exit 1 + if: failure() lint: runs-on: ubuntu-latest diff --git a/bin/install b/bin/install index b54ab72..d9cb6d1 100755 --- a/bin/install +++ b/bin/install @@ -44,9 +44,9 @@ install_poetry() { fi if [ "$install_type" = "version" ]; then - curl -sSL "$install_url" | POETRY_HOME=$install_path python3 - --version "$version" $flags + curl -sSL "$install_url" | sed 's/symlinks=False/symlinks=True/' | POETRY_HOME=$install_path python3 - --version "$version" $flags elif [ "$install_type" = "ref" ]; then - curl -sSL "$install_url" | POETRY_HOME=$install_path python3 - --git https://github.com/python-poetry/poetry.git@"$version" $flags + curl -sSL "$install_url" | sed 's/symlinks=False/symlinks=True/' | POETRY_HOME=$install_path python3 - --git https://github.com/python-poetry/poetry.git@"$version" $flags else fail "unknown install type" fi