Skip to content

Conversation

@LalatenduMohanty
Copy link
Member

Fixes #619

A different approach as compared to #618

@LalatenduMohanty LalatenduMohanty requested a review from a team as a code owner June 3, 2025 19:16
@LalatenduMohanty LalatenduMohanty force-pushed the attempt-2-using-hatch branch 2 times, most recently from 69b769d to b5d0407 Compare June 3, 2025 19:23
Copy link
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

This is much closer to what I was expecting. A few comments inline.

pyproject.toml Outdated
scripts.check = [
"mypy -p fromager",
"mypy tests/",
]
Copy link
Member

Choose a reason for hiding this comment

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

I think this could be a second command in the linter env, couldn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

We already have mypy check in workflows/check.yaml however the [tool.hatch.envs.mypy] section will be useful for

  • Enabling developers to run MyPy locally in the same way CI does.
  • Serving as the configuration for the MyPy environment if/when you update your CI workflow to use hatch commands.

@LalatenduMohanty LalatenduMohanty force-pushed the attempt-2-using-hatch branch 6 times, most recently from 64ae734 to 07c38e6 Compare June 3, 2025 20:30
@tiran
Copy link
Collaborator

tiran commented Jun 4, 2025

How about you split the PR into two, one for replacing setuptools with hatchling and then a second for replacing automation like tox with hatch? Your ticket #619 is about removing setuptools as a build backend and replacing it with hatchling, too.

We like to move more projects away from setuptools, because it has become a liability. Upstream has been introducing breaking changes and bugs a bunch of times. I'd like to use your work as a blueprint to promote hatchling internally and convince projects to move. Hatchling as a build project is transparent and barely changes how developers are interacting with Python packaging. A move from tox or Makefile to hatch is more work and changes the developer workflow. Tox is still fine.

@LalatenduMohanty LalatenduMohanty changed the title (Another attempt) Use hatchling/hatch instead of setuptools Use hatchling/hatch instead of setuptools Jun 4, 2025
@LalatenduMohanty LalatenduMohanty changed the title Use hatchling/hatch instead of setuptools Use hatchling instead of setuptools Jun 4, 2025
@LalatenduMohanty
Copy link
Member Author

@tiran Agree. I will split this PR in to two.

@LalatenduMohanty LalatenduMohanty force-pushed the attempt-2-using-hatch branch 5 times, most recently from b0b20f0 to 6909b69 Compare June 4, 2025 10:57
@LalatenduMohanty LalatenduMohanty force-pushed the attempt-2-using-hatch branch 2 times, most recently from 7bd7051 to 5ee64de Compare June 4, 2025 13:28
Copy link
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

I'm going to wait for CI to finish before approving, but this looks OK to me.

Fixes python-wheel-build#619

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
@LalatenduMohanty LalatenduMohanty force-pushed the attempt-2-using-hatch branch from 2ae1346 to 5e47f8b Compare June 4, 2025 13:40
@tiran
Copy link
Collaborator

tiran commented Jun 4, 2025

The PR looks good to me. Thanks @LalatenduMohanty

@mergify mergify bot merged commit 199b171 into python-wheel-build:main Jun 4, 2025
102 checks passed
LalatenduMohanty pushed a commit to LalatenduMohanty/fromager that referenced this pull request Jun 5, 2025
…pt-2-using-hatch

Use hatchling instead of setuptools

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
LalatenduMohanty pushed a commit to LalatenduMohanty/fromager that referenced this pull request Jun 5, 2025
…pt-2-using-hatch

Use hatchling instead of setuptools

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
LalatenduMohanty pushed a commit to LalatenduMohanty/fromager that referenced this pull request Jun 5, 2025
…pt-2-using-hatch

Use hatchling instead of setuptools

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use hatchling instead of setuptools

3 participants