gentle-branch-77209
10/04/2024, 4:46 PM[python]
interpreter_constraints = ["==3.10.*"]
enable_resolves = true
default_resolve = "poetry-lockfile"
[python.resolves]
poetry-lockfile = "poetrylock.lock"
BUILD (in top-level with pyproject.toml)
poetry_requirements(name='poetry')
BUILD (in same directory as tests)
python_sources(
name='repo_sources',
sources=[
'repo/**/*.py',
],
resolves='poetry-lockfile'
)
python_tests(
name='tests',
sources=[
'tests/**/*.py'
],
resolve="poetry-lockfile"
)
gorgeous-winter-99296
10/04/2024, 5:35 PMgorgeous-winter-99296
10/04/2024, 5:36 PMpants peek
, pants dependencies --transitive
of the test in question to see what Pants thinks.happy-kitchen-89482
10/04/2024, 10:44 PMnumba
then Pants won’t know to pull it into the sandbox. You can work around this by adding an explicit dependencies=
to your python_sources
. Or even better, add it via an overrides
, so that you’re adding it as a dep of just the file that actually uses it, instead of every file you’re globbing over…happy-kitchen-89482
10/04/2024, 10:45 PMhappy-kitchen-89482
10/04/2024, 10:45 PMgentle-branch-77209
10/07/2024, 8:28 AM