Skip to content

refactor: smarter pyproject.toml parsing#64

Merged
sgaist merged 3 commits intomainfrom
feature/pyproject-handling
Feb 8, 2026
Merged

refactor: smarter pyproject.toml parsing#64
sgaist merged 3 commits intomainfrom
feature/pyproject-handling

Conversation

@sgaist
Copy link
Member

@sgaist sgaist commented Feb 8, 2026

Describe your changes

This PR implements smarter handling of the pyproject.toml file during the poetry detection.

Currently if that file existence is the only condition for providing poetry.

The refactor adds a check for the content of the file so that if a different build system is used, poetry will not be provided.

The detection is done so that both old and new projects shall be handled without incompatibility.

Basically:

  • Files without build-system entries
  • Files with build-system's build-backend set to poetry.core.masonry.api

## Ticket links and issues

Fixes #48

Currently the poetry detection only accounts for the
presence of a pyproject.toml file which nowadays is
used by many other build backends.

The detection now checks whether the file contains
the corresponding build-system entry or no entry
which matches the poetry v1 implementation.

This should result in backward compatible behaviour.
@sgaist sgaist added the semver:patch A change requiring a patch version bump label Feb 8, 2026
@sgaist sgaist merged commit 68e0166 into main Feb 8, 2026
9 checks passed
@sgaist sgaist deleted the feature/pyproject-handling branch February 8, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch A change requiring a patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: improve support of pyproject.toml

1 participant