Skip to content

Commit 7cebe50

Browse files
committed
Add Python build dependencies for jsonschema >= 4.6.0
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).
1 parent b64e806 commit 7cebe50

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nix/pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ flake8 = "*"
3232
pep8-naming = "*"
3333
yapf = "*"
3434

35+
# These dependencies are required by the jsonschema >= 4.6.0 build system, but
36+
# are not detected automatically; they are also not present in the used Nixpkgs
37+
# snapshot, so need to be obtained through Poetry.
38+
hatchling = "*"
39+
hatch-vcs = "*"
40+
41+
# The `pytest` module in the used Nixpkgs snapshot has an upper bound on the
42+
# `pluggy` dependency, which conflicts with the dependency of the `hatchling`
43+
# module; upgrading the `pytest` module fixes the conflict.
44+
pytest = "*"
45+
46+
# Building the `tomli` module, which is in the dependency tree of `hatchling`,
47+
# requires a newer `flit-core` module than found in the used Nixpkgs snapshot.
48+
flit-core = "*"
49+
3550
[build-system]
3651
requires = ["poetry-core>=1.0.0"]
3752
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)