diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ea5a5b2..9536e03 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -43,6 +43,9 @@ jobs: poetry-version: '1.7.1' - python-version: '3.7' poetry-version: '1.8.1' + include: + - python-version: '3.11' + poetry-version: 'git+https://github.com/radoering/poetry.git@pep621-support' steps: - uses: actions/checkout@v4 with: @@ -52,7 +55,7 @@ jobs: python-version: ${{ matrix.python-version }} - run: | pip install pipx - pipx install poetry==${{ matrix.poetry-version }} + pipx install ${{ startsWith(matrix.poetry-version, 'git') && matrix.poetry-version || format('poetry=={0}', matrix.poetry-version) }} pipx install invoke poetry install --extras plugin diff --git a/poetry_dynamic_versioning/plugin.py b/poetry_dynamic_versioning/plugin.py index 55c1077..fab2984 100644 --- a/poetry_dynamic_versioning/plugin.py +++ b/poetry_dynamic_versioning/plugin.py @@ -81,8 +81,9 @@ def _apply_version_via_plugin( io: bool = True # fmt: on ) -> None: + project_section = poetry.pyproject.data.get("project", {}) name = _get_and_apply_version( - name=poetry.local_config["name"], + name=project_section.get("name") or poetry.local_config["name"], original=poetry.local_config["version"], pyproject=poetry.pyproject.data, pyproject_path=_get_pyproject_path_from_poetry(poetry.pyproject),