cool-easter-32542
01/09/2025, 3:43 PMpython_sources(
name="foo_lib",
sources=["foo.py"], # Include only source files
)
python_tests(
name="foo_lib_tests",
dependencies=[":foo_lib"], # Test depends on the library
sources=["test_foo.py"], # Include only test files
)
/pants.toml
[GLOBAL]
pants_version = "2.23.0"
backend_packages = [
"pants.backend.python",
"pants.backend.docker",
"pants.backend.shell",
"pants.backend.experimental.python.lint.ruff.check"
]
[python]
interpreter_constraints = [">=3.7"]
[source]
root_patterns = ["/src"]
/BUILD
shell_sources(
name="0",
)
python_sources(
name="root",
)
image
Works without an issue if root_patterns = ["/"].
pantsbuild/pantscool-easter-32542
01/09/2025, 3:43 PM