Skip to content

Convert setup.cfg and setup.py to pyproject.toml#135

Merged
martinpopel merged 6 commits intomasterfrom
copilot/convert-setup-files-to-pyproject
Dec 15, 2025
Merged

Convert setup.cfg and setup.py to pyproject.toml#135
martinpopel merged 6 commits intomasterfrom
copilot/convert-setup-files-to-pyproject

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Migrates package configuration from legacy setup.py/setup.cfg to modern PEP 621 and PEP 639 pyproject.toml format.

Changes

  • pyproject.toml: Added complete [project] section with metadata, dependencies, entry points, and optional dependencies migrated from setup.cfg
  • Removed files: setup.py and setup.cfg (no longer needed)
  • License: Updated to follow PEP 639 using SPDX identifier license = "GPL-3.0-or-later" and removed license classifier (superseded by SPDX expression)
  • Version: Bumped from 0.5.1 to 0.5.2
  • README.md: Updated Python requirement from 3.6 to 3.9 to match pyproject.toml
  • Optional dependencies: Added ufal.udpipe as an optional dependency for users who need UDPipe parser support

The entry point udapy = udapi.cli:main uses modern dot notation instead of the legacy udapi:cli.main format but resolves to the same import path.

All configuration previously in setup.cfg is now in pyproject.toml:

[project]
name = "udapi"
version = "0.5.2"
requires-python = ">=3.9"
license = "GPL-3.0-or-later"
dependencies = ["colorama", "termcolor"]

[project.scripts]
udapy = "udapi.cli:main"

[project.optional-dependencies]
test = ["pytest"]
udpipe = ["ufal.udpipe"]
Original prompt

Convert setup.cfg and setup.py into pyproject.toml.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 15, 2025 14:43
Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert setup.cfg and setup.py into pyproject.toml Convert setup.cfg and setup.py to pyproject.toml Dec 15, 2025
Copilot AI requested a review from martinpopel December 15, 2025 14:48
@martinpopel
Copy link
Contributor

martinpopel commented Dec 15, 2025

@copilot Please, in addition, follow https://peps.python.org/pep-0639/, update Python 3.6 to 3.9 in README.md and bump the version to 0.5.2.

1 similar comment
@martinpopel
Copy link
Contributor

@copilot Please, in addition, follow https://peps.python.org/pep-0639/, update Python 3.6 to 3.9 in README.md and bump the version to 0.5.2.

….5.2

Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 15, 2025

@copilot Please, in addition, follow https://peps.python.org/pep-0639/, update Python 3.6 to 3.9 in README.md and bump the version to 0.5.2.

Done in commit 072cab4. Changed license to follow PEP 639 using {file = "LICENSE"}, updated Python 3.6 to 3.9 in README.md, and bumped version to 0.5.2.

@copilot Please, in addition, follow https://peps.python.org/pep-0639/, update Python 3.6 to 3.9 in README.md and bump the version to 0.5.2.

Done in commit 072cab4. Changed license to follow PEP 639 using {file = "LICENSE"}, updated Python 3.6 to 3.9 in README.md, and bumped version to 0.5.2.

Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
@martinpopel
Copy link
Contributor

@copilot Can we use just license = "GPL-3.0-or-later" and add ufal.udpipe into optional dependencies?

Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 15, 2025

@copilot Can we use just license = "GPL-3.0-or-later" and add ufal.udpipe into optional dependencies?

Done in commit 8822413. Changed to license = "GPL-3.0-or-later" (SPDX identifier) and added ufal.udpipe to optional dependencies as [project.optional-dependencies] udpipe = ["ufal.udpipe"]. Also removed the license classifier as it's superseded by the SPDX license expression per PEP 639.

@martinpopel martinpopel marked this pull request as ready for review December 15, 2025 15:43
@martinpopel martinpopel merged commit 242dbe6 into master Dec 15, 2025
1 check passed
@martinpopel martinpopel deleted the copilot/convert-setup-files-to-pyproject branch December 15, 2025 15:47
@bollwyvl bollwyvl mentioned this pull request Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants