Skip to content

Use pyproject and remove setup.py#188

Merged
acdha merged 5 commits intoLibraryOfCongress:masterfrom
edsu:rm-setuptools
Feb 27, 2026
Merged

Use pyproject and remove setup.py#188
acdha merged 5 commits intoLibraryOfCongress:masterfrom
edsu:rm-setuptools

Conversation

@edsu
Copy link
Contributor

@edsu edsu commented Jun 5, 2025

This commit includes changes to remove the use of setup.py and setuptools in favor of using the existing pyproject.toml and hatch.

A source layout was chosen, which required several changes such as:

  • pushing bagit.py into src/bagit/
  • pushing locale into src/bagit/locale

The gettext related code in setup.py was relocated to utils/locales.py It's very possible the way that the gettext functionality is setup needs some adjustment, as I'm new to using it.

Also we now rely on running tests with uv and pytest, which happens in the test github action. We could chose to update the PyPI publishing step to use uv build/publish too?

@edsu edsu force-pushed the rm-setuptools branch from 31f97b8 to 0d4a6ae Compare June 5, 2025 16:28
@edsu edsu force-pushed the rm-setuptools branch 3 times, most recently from 74d1545 to 9ba473a Compare June 5, 2025 19:23
@acdha acdha force-pushed the rm-setuptools branch 2 times, most recently from a9fd421 to a350cd5 Compare February 27, 2026 20:36
acdha
acdha previously approved these changes Feb 27, 2026
Copy link
Member

@acdha acdha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has sat long enough and should be the baseline for new work like #198

acdha and others added 5 commits February 27, 2026 15:37
This commit includes changes to remove the use of setup.py and
setuptools in favor of using the existing pyrproject.toml and hatch.

A source layout was chosen, which required several changes such as:

- pushing bagit.py into src/bagit/
- pushing locale into src/bagit/locale

The gettext related code in setup.py was relocated to utils/locales.py
It's possible the way that the gettext functionality is setup needs to
adjustment, as I'm new to using it.

Also we now rely on running tests with uv and pytest, which happens in the test
github action. We could chose to update the PyPI publishing step to use
uv build/publish too?
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

@acdha acdha merged commit 7ca9a0e into LibraryOfCongress:master Feb 27, 2026
9 of 10 checks passed
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