Conversation
This commit creates a flake.nix file defining a minimal build
environment for Nix users. If you have Nix, you can run
nix develop
to enter a FHS-compliant environment with Python 3.10, 3.11, 3.12,
3.13, and 3.14 installed, along with development tools like tox and
pre-commit. From here, ordinary commands like
tox -e linting,py310,py311,py312,py313,py314
work as expected.
Note that this environment does not provide any Python packages except
tox; all dependencies are installed via tox as if we were not using
Nix.
3b9aaed to
7db658b
Compare
webknjaz
left a comment
There was a problem hiding this comment.
I think this doesn't belong upstream as having it implies an unreasonable amount of maintenance burden for the maintainers. It usually makes sense to maintain what's in the CI and in the expected dev env, which is tox — allowing us to reduce said burdens by using a workflow tool that makes the CI configuration as close as possible to the dev env.
flake.nix
Outdated
| @@ -0,0 +1,70 @@ | |||
| { | |||
| description = "Development environment for Pytest"; | |||
There was a problem hiding this comment.
We should note that this is a convenience for and by nix users and not maintained by pytest core
There was a problem hiding this comment.
Sure thing; updated. Happy with whatever language you'd like.
I certainly didn't intend for this to weigh on maintainers; my hope is that it would almost never be touched, as it really just provides a way to get I'm new here so this offer isn't worth much, but I'd be happy to update this if it somehow falls out of sync down the line. |
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
I think it's OK to add this
With the expectation that nix users guy it if necessary
Im no longer a nix user and unless something about nix changes im not picking it up again
Overview
This commit creates a flake.nix file defining a minimal build environment for Nix users. If you have Nix installed, you can run
to enter an environment where
work as expected.
Details
This change does not impose any changes on existing workflows; it is intended only to make it easier for Nix users to contribute to
pytest.For those Nix users, this change does not even package
pytestas a Nix derivation; instead, it provides a minimal build environment that behaves like an "ordinary" Python environment, albeit one with allpytest-supported versions of Python installed.Testing
The commands
followed by
passes.
Closes #14250.