Skip to content

Conversation

@iamdhakrey
Copy link
Contributor

This PR migrates the project packaging from setuptools to Hatch, by introducing a complete pyproject.toml configuration and removing the legacy setup.py + VERSION file approach.

  • Adds pyproject.toml with project metadata, dependencies, license, classifiers etc.
  • Uses Hatch dynamic versioning, reading version from jwcrypto/version.py.
  • Removes jwcrypto/VERSION files.
  • Updates build targets to produce wheel and sdist correctly under Hatch.

Closes #304

Copy link
Member

@simo5 simo5 left a comment

Choose a reason for hiding this comment

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

Sounds like the 1st, 2nd and 4th commit should be squashed, and code changed to just import the version file.

@simo5
Copy link
Member

simo5 commented Dec 2, 2025

I also do not see removal of setup.py here, should this PR marked as draft until all objectives are reached?
Or is your plan to keep setup.py and hatch support both available at the same time for now?

@iamdhakrey
Copy link
Contributor Author

At the moment I’m keeping both setup.py and Hatch support to ensure a smooth transition. setup.py will be fully removed in a future PR.

Copy link
Member

@simo5 simo5 left a comment

Choose a reason for hiding this comment

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

LGTM,
the only thing I notice is that the first commit will not work w/o the second so may as well just squash them

@iamdhakrey
Copy link
Contributor Author

LGTM, the only thing I notice is that the first commit will not work w/o the second so may as well just squash them

I’ve squashed the two dependent commits into a single one, as suggested.

@iamdhakrey iamdhakrey requested a review from simo5 December 6, 2025 06:04
@simo5
Copy link
Member

simo5 commented Dec 8, 2025

TBH I do not remember what this file is used for, but VERSION is also referenced in MANIFEST.in and would need to be changed as well. Otherwise PR is good.

and remove setup.py-based build configuration

Replace VERSION file with version.py for version metadata

Refactor setup.py to read version from python source instead of plain
file

Replace VERSION file with version.py for version metadata in docs

import version directly from jwcrypto.version in conf.py

v

s
@iamdhakrey
Copy link
Contributor Author

I've removed the VERSION reference from MANIFEST.in since it's no longer needed with dynamic versioning.Changes pushed

@simo5 simo5 merged commit a0fa2ea into latchset:main Dec 9, 2025
16 checks passed
@simo5
Copy link
Member

simo5 commented Dec 9, 2025

Thanks for the contribution!

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.

Migrate from setuptools/tox to hatch

2 participants