On 15/07/25 23:03, David Faust wrote:
+DEVELOPMENT
+===========
+
+Development dependencies are specified in `pyproject.toml`, which can be used
+with any suitable Python virtual environment manager.
+
+To run the test suite:
+
+ python3 -m pytest
Can the tests be run without a pyproject.toml, or is it required?
(I mean the tests of bpf-vmtest-tool itself)
The current tests can be run with "python3 -m pytest
--import-mode=importlib tests" without pyproject.toml. But some pytest
options can only be specified in pyproject.toml file and don't have
command-line alternatives.
As far as I understand it is typically for packages. But in this case
it seems, now that we don't have external deps, to come down to a local
development utility thing along the lines of .clang-format or so, which
we aren't checking in.
Yes, pyproject.toml is used for packaging python projects, but it's also
used by tools like pytest and ruff under their [tool.*] tables (see:
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ )
While it's not needed to run the script itself, most development tools
depend on it, so I think it makes sense to include it in the source to
help set up consistent development environments.
OK, thanks for clarifying.
I don't have a strong opinion either way. For C we do not maintain in-tree
configs for development environments, but they probably make more sense for
python. So I'll defer to you :)
(Note: I'm not sure whether there is already a rule about this for contrib/
one way or the other, if there is we should follow it. )
I couldn’t find any specific rule about this, but I did find two
setup.cfg files committed for python scripts
contrib/gcc-changelog/setup.cfg
maintainer-scripts/setup.cfg
setup.cfg is the older way of specifying project metadata, which has now
been replaced by pyproject.toml. So I think we can keep pyproject.toml
in the patch.
Thanks