How am I supposed to add the `py.typed`?
# general
s
How am I supposed to add the
py.typed
?
1
Copy code
resource(name="stubs", source="py.typed")

python_sources(dependencies=[":stubs"])
like this? It works. Is it the best way?
h
I think that’s correct
we should probably add it to the default globs for
python_sources
If you want to cook up a quick PR for that?
c
What do you think of having a field on the
python_distribution
for instance, so when
typed=True
that file is materialized and included in the dist? Then as a user you don’t need to bother with that boiler platey stuff.. (one stub file, one target and an explicit dep)
s
That would be cool
h
I.e., we generate the file?
Alongside the generated setup.py?
c
yep
and suggested implementation, later closed here: https://github.com/pantsbuild/pants/pull/12751
could serve as inspiration and/or deterrent 😛