Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize the packaging setup via PEP 621 and Hatch. #957

Merged
merged 8 commits into from May 31, 2022
Merged

Modernize the packaging setup via PEP 621 and Hatch. #957

merged 8 commits into from May 31, 2022

Conversation

Julian
Copy link
Member

@Julian Julian commented May 28, 2022

Doing so jettisons setuptools in favor of a more modern, well-designed,
legacy-free, and now well-supported packaging tool, Hatch.

No end-user facing behavior changes are expected for any users using a
recent packaging setup (within the past 2-3 years), so please report any
issues.

Hatch: https://hatch.pypa.io/latest/
PEP 621: https://peps.python.org/pep-0621/

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2022

Codecov Report

Merging #957 (9602996) into main (bc61702) will not change coverage.
The diff coverage is n/a.

❗ Current head 9602996 differs from pull request most recent head 69d3787. Consider uploading reports for the commit 69d3787 to get more accurate results

@@           Coverage Diff           @@
##             main     #957   +/-   ##
=======================================
  Coverage   96.88%   96.88%           
=======================================
  Files          20       20           
  Lines        3276     3276           
  Branches      449      449           
=======================================
  Hits         3174     3174           
  Misses         79       79           
  Partials       23       23           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2fb1df...69d3787. Read the comment docs.

@Julian Julian force-pushed the hatch branch 3 times, most recently from d87f32f to 9602996 Compare May 28, 2022 15:05
Doing so jettisons setuptools in favor of a more modern, well-designed,
legacy-free, and now well-supported packaging tool, Hatch.

No end-user facing behavior changes are expected for any users using a
recent packaging setup (within the past 2-3 years), so please report any
issues.

Hatch: https://hatch.pypa.io/latest/
PEP 621: https://peps.python.org/pep-0621/
@Julian Julian merged commit 1426364 into main May 31, 2022
@Julian Julian deleted the hatch branch May 31, 2022 18:16
sigprof added a commit to sigprof/nix-devenv-qmk that referenced this pull request Jun 12, 2022
The `jsonschema` module switched the packaging system to Hatch since
version 4.6.0 (python-jsonschema/jsonschema#957).  The build process for
`jsonschema` now requires the `hatchling` and `hatch-vcs` modules, but
the used Nixpkgs snapshot does not include Nix packages for these
modules; adding these modules to the `[tool.poetry.dev-dependencies]`
section makes them available for the (upcoming) poetry2nix override
without the need to bump the Nixpkgs snapshot.

However, simply adding `hatchling` and `hatch-vcs` to dependencies
produces some more dependency issues:

  1) The `pytest` module in the used Nixpkgs snapshot is old and has a
     dependency for the `pluggy` module with an upper bound for the
     version, which creates a version conflict with the dependency of
     the `hatchling` module.  Upgrading the `pytest` module to the
     current version fixes this compatibility issue.

  2) The `tomli` module, which is in the dependency tree of `hatchling`,
     requires a newer `flit-core` module than found in the used Nixpkgs
     snapshot.  Again, upgrading the `flit-core` module to the current
     version fixes the compatibility issue.

When the Nixpkgs snapshot gets bumped in the future, this commit should
probably be reverted (and `poetry.lock` should be regenerated to remove
the unneeded dependencies).
sigprof added a commit to sigprof/nix-devenv-qmk that referenced this pull request Jun 12, 2022
The `jsonschema` module switched the packaging system to Hatch since
version 4.6.0 (python-jsonschema/jsonschema#957).  The build process for
`jsonschema` now requires the `hatchling` and `hatch-vcs` modules, which
were made available to poetry2nix by the previous commits; add these
modules to `nativeBuildInput` to fix the build.
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.

None yet

2 participants