poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Can not install package in CI

Open PythonFZ opened this issue 11 months ago • 4 comments

Description

All my poetry projects CI fails with the latest release. They are using

   steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install Poetry
        uses: snok/install-poetry@v1
        with:
          virtualenvs-create: true
          virtualenvs-in-project: true
      - name: Install package
        run: |
          poetry install --no-interaction

and just fail with

Installing the current project: znsocket (0.2.8)

'Repository'
Error: Process completed with exit code 1.

This seems more or less independent of the requirements as different packages are affected, e.g.:

  • https://github.com/zincware/ZnSocket
  • https://github.com/zincware/ZnDraw
  • https://github.com/zincware/rdkit2ase
  • https://github.com/zincware/ZnTrack
  • ...

Workarounds

Poetry Installation Method

other

Operating System

ubuntu-latest

Poetry Version

v2

Poetry Configuration

see https://github.com/snok/install-poetry

Python Sysconfig

3.9 to 3.12

Example pyproject.toml

-

Poetry Runtime Logs

see e.g. https://github.com/zincware/ZnSocket/actions/runs/12626057845/job/35178634129

PythonFZ avatar Jan 06 '25 08:01 PythonFZ

https://github.com/python-poetry/poetry-core/pull/803

dimbleby avatar Jan 06 '25 08:01 dimbleby

Seeing same error...

...
2025-01-06T14:34:36.9275374Z   - Installing vonage (3.17.4)
2025-01-06T14:34:36.9564594Z   - Installing xlsxlite (0.2.0)
2025-01-06T14:34:41.8326345Z 
2025-01-06T14:34:41.8327646Z Installing the current project: temba (9.3.140)
2025-01-06T14:34:41.8353990Z 
2025-01-06T14:34:41.8354204Z 'Repository'
2025-01-06T14:34:41.9161412Z ##[error]Process completed with exit code 1.

rowanseymour avatar Jan 06 '25 14:01 rowanseymour

Same for me. I had to add a packages section in tools.poetry in pyproject.toml for one build to work. But another project which uses submodules is failing to import modules within the submodules even with that fix

boltzmann-brain avatar Jan 06 '25 20:01 boltzmann-brain

my project structure is:

+--project_name | +-- pyproject.toml | +-- src (where all the modules to be installed are)

Previously in pyproject.toml I did not have a packages section in [tool.poetry]. This was fine until 2.0.0. With 2.0.0, I get Warning: The current project could not be installed: No file/folder found for package [project_name]

I made the change adding the following to [tool.poetry] in pyproject.toml:

packages = [
    { include = "src", from = "." }
]

This worked for one project, but for another project, although it also helped avoid the error above, I got a different error about not finding modules in a submodule.

boltzmann-brain avatar Jan 06 '25 20:01 boltzmann-brain

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Feb 11 '25 00:02 github-actions[bot]