I'm trying to figure out how I should think about ...
# general
f
I'm trying to figure out how I should think about
python_library()
targets that
pants tailor
generates for me. In particular, it is generating them for "scripts" in our repo that we'd nominally intend not to be importing. Should I think about them as just "there's python code here pants needs to know about"? Or if there is code that we don't intend to import is there a better way to structure the targets?
h
Hello! If you use Pants 2.8.0rc4, the modeling is more clear. We renamed it to
python_sources
, which generates a
python_source
target per file in the
sources
field.
python_source
is what Pants actually cares about,
python_sources
exists for less boilerplate Indeed, it's "Python code here that Pants should know about". If you want to completely ignore those files with Pants, you can now do that with ignore options for `tailor`: https://www.pantsbuild.org/v2.8/docs/create-initial-build-files 2.8.0rc4 should be fairly stable - the only thing holding us back from stabilizing is finishing rewriting some of the docs + the announcement blog
f
Great! that clarifies things, thansk!
❤️ 1
w
you may not import the code anywhere, but the target metadata is also what declares that Pants should
lint
,
typecheck
, etc a target
2